lookatstudy-mobile 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.cjs +410 -309
- package/web/assets/Tableau10-Cz3F1amA.js +1 -0
- package/web/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
- package/web/assets/abnfDiagram-N423BO3Z-8yV8azEb.js +1 -0
- package/web/assets/abnfDiagram-VCTEODGH-ODA7YWAP-Hu8Io8Wl.js +1 -0
- package/web/assets/api-web-DeJFZI02.js +1 -0
- package/web/assets/arc-Bb-hQPAI.js +1 -0
- package/web/assets/architectureDiagram-5GKGNRK7-C4PU3XN7-CQOoxxjB.js +36 -0
- package/web/assets/{architectureDiagram-T3A2C74G-djSyr1mz.js → architectureDiagram-T3A2C74G-BY3MPO2q.js} +3 -3
- package/web/assets/band-dPffDWoQ.js +1 -0
- package/web/assets/blockDiagram-NRAW4CY4-UMJ6PMQQ-DCodWcfi.js +129 -0
- package/web/assets/{blockDiagram-VBNYF7ZC-CMyKXBrP.js → blockDiagram-VBNYF7ZC-Cs8gW07q.js} +4 -4
- package/web/assets/c-BIGW1oBm.js +1 -0
- package/web/assets/{c4Diagram-5PPSVZJV-BIkHBEIX.js → c4Diagram-5PPSVZJV-BaDYq1iY.js} +2 -2
- package/web/assets/c4Diagram-UCG6FXSJ-75X3U2P3-D8KjWrW6.js +38 -0
- package/web/assets/channel-CkU7npgF.js +1 -0
- package/web/assets/chunk-2GRJ4B5K-BK719SY2.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-5KwfG7mC.js → chunk-2Q5K7J3B-D7jlPMQE.js} +1 -1
- package/web/assets/{chunk-5RXB4S5H-BfjkbTOR.js → chunk-5RXB4S5H-bGXVd3Jw.js} +3 -3
- package/web/assets/{chunk-5VM5RSS4-CknJ0UrM.js → chunk-5VM5RSS4-D9xlyRps.js} +1 -1
- package/web/assets/{chunk-6Q2QTUOP-PEKlwd8q.js → chunk-6Q2QTUOP-BQfUyvrG.js} +3 -3
- package/web/assets/chunk-7XDTSPCN-B-9pwFMM.js +338 -0
- package/web/assets/chunk-CTNIYPP6-g14t-jwn.js +1 -0
- package/web/assets/chunk-CXNFBKHE-00mUrV5B.js +15 -0
- package/web/assets/{chunk-GF5L2VYU-FwREiZq-.js → chunk-GF5L2VYU-DI8igewt.js} +4 -4
- package/web/assets/chunk-ISA7TJRJ-fJ_re2vQ.js +1 -0
- package/web/assets/{chunk-JWPE2WC7-Df8WvQEt.js → chunk-JWPE2WC7-D9AfkJQL.js} +1 -1
- package/web/assets/chunk-KBJHAD2P-BZqL5y3m.js +1 -0
- package/web/assets/chunk-LV3HUYFY-BxktvUc8.js +1 -0
- package/web/assets/chunk-M3IUQBOH-BjG54m1m.js +231 -0
- package/web/assets/chunk-NDIOYS4C-BoD9ps-d.js +1 -0
- package/web/assets/chunk-RE4WF27V-BWxsdYy-.js +1 -0
- package/web/assets/{chunk-RYQCIY6F-w-ex678p.js → chunk-RYQCIY6F-K7UDuCLa.js} +1 -1
- package/web/assets/chunk-VII2H2IX-BBCzYovE.js +1 -0
- package/web/assets/chunk-X5GNSKZ3-BSfJufGp.js +206 -0
- package/web/assets/chunk-XCWWM2C3-C9kEcEJX.js +88 -0
- package/web/assets/chunk-XXDRQBXY-EN-RzD6P.js +1 -0
- package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-CwAbxcIS.js +1 -0
- package/web/assets/classDiagram-JCYQIIEL-CFdFhW_f.js +1 -0
- package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-CwAbxcIS.js +1 -0
- package/web/assets/classDiagram-v2-OCEON4UE-CFdFhW_f.js +1 -0
- package/web/assets/colors-Cc3OSVma.js +1 -0
- package/web/assets/core-DRYwaSvl.js +12 -0
- package/web/assets/{cose-bilkent-JH36ORCC-CuRVnite.js → cose-bilkent-JH36ORCC-B2U6UL6w.js} +1 -1
- package/web/assets/cose-bilkent-JH36ORCC-OB24KH3T-CLeS4DXH.js +1 -0
- package/web/assets/cpp-DddhVWhK.js +1 -0
- package/web/assets/csharp-DSvCPggb.js +1 -0
- package/web/assets/css-CLj8gQPS.js +1 -0
- package/web/assets/cynefin-OW5HDTMX-GVF3BKWE-DYE07Rlo.js +178 -0
- package/web/assets/{cynefin-VYW2F7L2-deqxDK2d.js → cynefin-VYW2F7L2-_u-T-i97.js} +1 -1
- package/web/assets/cynefinDiagram-5FMLGOSQ-H3WIRU3N-BXAAs6UR.js +62 -0
- package/web/assets/cynefinDiagram-MW4NZA55-Dwt6UFU-.js +62 -0
- package/web/assets/dagre-3AP2YEHR-DCERTXHT-BOLEkqa2.js +4 -0
- package/web/assets/{dagre-VZM6K2ZE-CGNHDakS.js → dagre-VZM6K2ZE-Dre6DiIg.js} +2 -2
- package/web/assets/{defaultLocale-DX6XiGOO.js → defaultLocale-5voVPcsN.js} +1 -1
- package/web/assets/{diagram-7IWD3JNH-D_gUTAQc.js → diagram-7IWD3JNH-DNM6DSsS.js} +4 -4
- package/web/assets/{diagram-B4RE2ZJO-YGyPH2BM.js → diagram-B4RE2ZJO-C4jlfMG1.js} +3 -3
- package/web/assets/diagram-LBJQPF4R-CjmI5T7e.js +24 -0
- package/web/assets/diagram-Q27KOJAE-8qnKVgjF.js +24 -0
- package/web/assets/diagram-S7CK7UJ4-MULGZGEL-ZGFt5MWV.js +30 -0
- package/web/assets/diagram-UB23O5K3-BFacsRPb.js +41 -0
- package/web/assets/diagram-UQ7AKVKN-YQBY353J-Dtr2a-Sh.js +41 -0
- package/web/assets/diagram-VSXAHHWV-WLNH2ELY-D6lPkI35.js +3 -0
- package/web/assets/diagram-VX7I27RA-XW6YQV5G-BtVW30f4.js +24 -0
- package/web/assets/diagram-Z3DM3KII-HG7RF65D-Jiuk-Aw-.js +24 -0
- package/web/assets/diff-D97Zzqfu.js +1 -0
- package/web/assets/dockerfile-BcOcwvcX.js +1 -0
- package/web/assets/ebnfDiagram-BXEA7PRR-B9caUKt8.js +1 -0
- package/web/assets/ebnfDiagram-PWID7BFC-OKY4VHYD-DgDpkWFs.js +1 -0
- package/web/assets/elk.bundled-DGBi53uM.js +24 -0
- package/web/assets/engine-javascript-DBd1bXLz.js +141 -0
- package/web/assets/{erDiagram-JOGREHBK-BuY7vR4r.js → erDiagram-JOGREHBK-BcDJRpEn.js} +4 -4
- package/web/assets/erDiagram-SSCWMZ5O-PIPKOIK7-CxhZR8MK.js +99 -0
- package/web/assets/flowDiagram-A5DVABFB-2Z4AVO5R-tQM90RjU.js +168 -0
- package/web/assets/{flowDiagram-UKHOOZJN-TxEOjs8K.js → flowDiagram-UKHOOZJN-BM-wjcQd.js} +10 -10
- package/web/assets/ganttDiagram-EL5Y4UJY-JZNG7GOG-BAA1d3RL.js +292 -0
- package/web/assets/ganttDiagram-PKOTCBZU-CM91BaSc.js +292 -0
- package/web/assets/{gitGraphDiagram-DS77QQ5N-rZzK4UXV.js → gitGraphDiagram-DS77QQ5N-B6dIpbMD.js} +7 -7
- package/web/assets/gitGraphDiagram-WWUBYQGX-DMWMLL3G-dwqPzDnw.js +106 -0
- package/web/assets/github-dark-DHJKELXO.js +1 -0
- package/web/assets/github-light-DAi9KRSo.js +1 -0
- package/web/assets/go-C27-OAKa.js +1 -0
- package/web/assets/graphql-ChdNCCLP.js +1 -0
- package/web/assets/html-pp8916En.js +1 -0
- package/web/assets/index-CF-iT6MC.js +416 -0
- package/web/assets/index-CU6ublfJ.js +1 -0
- package/web/assets/index-CvYzv8kf.js +1 -0
- package/web/assets/{index-DFfbtrtQ.js → index-Da7rGZtd.js} +1 -1
- package/web/assets/index-H1bePBGl.js +3 -0
- package/web/assets/index-P1o129ra.css +1 -0
- package/web/assets/infoDiagram-6WML65LV-CJJzT6aM.js +2 -0
- package/web/assets/infoDiagram-RXCK75RN-HANS5KVC-BPwc-Bwl.js +2 -0
- package/web/assets/ini-BEwlwnbL.js +1 -0
- package/web/assets/ishikawaDiagram-5VMMS53U-7GCIT7WU-Cpq43ikb.js +70 -0
- package/web/assets/{ishikawaDiagram-WSZJBQD7-B4Ja0YPZ.js → ishikawaDiagram-WSZJBQD7-DubGIdOK.js} +6 -6
- package/web/assets/java-CylS5w8V.js +1 -0
- package/web/assets/javascript-wDzz0qaB.js +1 -0
- package/web/assets/journeyDiagram-EYS64GPL-OAPELBT7-D3XViI72.js +139 -0
- package/web/assets/{journeyDiagram-NVQOT4AX-BmhpGG29.js → journeyDiagram-NVQOT4AX-0aAFGip4.js} +2 -2
- package/web/assets/json-Cp-IABpG.js +1 -0
- package/web/assets/jsx-g9-lgVsj.js +1 -0
- package/web/assets/{kanban-definition-27J2QSJJ-CiuTLc9W.js → kanban-definition-27J2QSJJ-CMrVGYMZ.js} +8 -8
- package/web/assets/kanban-definition-3QL26DDD-I7RKWQQY-CGYwl0b2.js +89 -0
- package/web/assets/katex-N6JRN4PM-CNMqOPcl.js +257 -0
- package/web/assets/kotlin-BdnUsdx6.js +1 -0
- package/web/assets/latex-B2nUCzCX.js +1 -0
- package/web/assets/linear-BHfMepXe.js +1 -0
- package/web/assets/lua-BaeVxFsk.js +1 -0
- package/web/assets/main-M3I_1kRU.js +796 -0
- package/web/assets/makefile-CHLpvVh8.js +1 -0
- package/web/assets/markdown-Cvjx9yec.js +1 -0
- package/web/assets/mermaid-layout-elk.core-DjMR2oH-.js +2 -0
- package/web/assets/mermaid.core-ByzWvwin.js +314 -0
- package/web/assets/min-tv6RD-6E.js +1 -0
- package/web/assets/{mindmap-definition-FAOFIHXS-Bt-VPht2.js → mindmap-definition-FAOFIHXS-CYXglBxa.js} +4 -4
- package/web/assets/mindmap-definition-FBJOCRG2-KIYZG64Y-DLlwIOas.js +96 -0
- package/web/assets/pegDiagram-VL7TDLO6-pbsV1fgz.js +1 -0
- package/web/assets/pegDiagram-XKGWAZYB-OIP57N6J-DFfCKEzp.js +1 -0
- package/web/assets/{pet-a4xGZJ4o.js → pet-C3GO3Fno.js} +1 -1
- package/web/assets/php-Csjmro_R.js +1 -0
- package/web/assets/pie-xhYaZtwS.js +1 -0
- package/web/assets/pieDiagram-7S7Q4E2Y-dL2At1sw.js +39 -0
- package/web/assets/pieDiagram-E7YTZNPT-2UOTW327-DWZ2vJZQ.js +39 -0
- package/web/assets/python-B6aJPvgy.js +1 -0
- package/web/assets/quadrantDiagram-AXDQQJYC-SN3ASJJK-BCPE7HYN.js +7 -0
- package/web/assets/{quadrantDiagram-CIZ2JOQS-B-1McWhJ.js → quadrantDiagram-CIZ2JOQS-DrBNOs2i.js} +2 -2
- package/web/assets/r-Cf5RLm7j.js +1 -0
- package/web/assets/railroadDiagram-AXF67PYL-BpFIFX46.js +1 -0
- package/web/assets/railroadDiagram-O6MQD6OU-34742W6X-CDhgV93N.js +1 -0
- package/web/assets/render-O7CIS3YK-C7r3R__z.js +354 -0
- package/web/assets/requirementDiagram-EFPCY7ZU-NGAFFSMB-CQ0OGS9S.js +84 -0
- package/web/assets/{requirementDiagram-LRYGKXZP-BVqLmmFw.js → requirementDiagram-LRYGKXZP-SBbvn1y5.js} +4 -4
- package/web/assets/ruby-B6QtyW_S.js +1 -0
- package/web/assets/rust-B1yitclQ.js +1 -0
- package/web/assets/sankeyDiagram-P5KCCOFB-3D3M4XPB-CHfruYZ1.js +40 -0
- package/web/assets/sankeyDiagram-W5VNT64P-DWjsGwhy.js +40 -0
- package/web/assets/scss-D5BDwBP9.js +1 -0
- package/web/assets/{sequenceDiagram-SI44F4Z6-7pBYtwXq.js → sequenceDiagram-SI44F4Z6-C7ed7ns_.js} +3 -3
- package/web/assets/sequenceDiagram-WJ2MYXX4-Q2IOPB4R-DNFw2KsW.js +162 -0
- package/web/assets/shellscript-Yzrsuije.js +1 -0
- package/web/assets/sizeCapture-X5ZJPWSS-B_RFzsLc.js +1 -0
- package/web/assets/sizeCapture-X5ZJPWSS-PSGVOMYM-i0qrKW2y.js +1 -0
- package/web/assets/sql-CRqJ_cUM.js +1 -0
- package/web/assets/stateDiagram-HBIQ2CUA-4M2S6MAN-7Y0EkjZH.js +1 -0
- package/web/assets/stateDiagram-OKZ733FA-DstrGK-x.js +1 -0
- package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-B_jJ0z7w.js +1 -0
- package/web/assets/stateDiagram-v2-UEYNNEHI-CxK2fzBn.js +1 -0
- package/web/assets/step-SI6FXFD6.js +1 -0
- package/web/assets/swift-C2oV4EkX.js +1 -0
- package/web/assets/swimlanes-SLNWSIFB-CUPJek2K.js +2 -0
- package/web/assets/swimlanes-XN3QIQJK-N6N2CCQ6-CpRmlFCA.js +1 -0
- package/web/assets/swimlanesDiagram-ULZ7WXOC-CjewHvpH.js +8 -0
- package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-CkoMUBT6.js +8 -0
- package/web/assets/time-CLfYygnx.js +1 -0
- package/web/assets/timeline-definition-24CTP7MA-KN7RSRVM-xmIijugB.js +120 -0
- package/web/assets/{timeline-definition-Z64GVDOM-CPyFZDbL.js → timeline-definition-Z64GVDOM-sVSky16H.js} +4 -4
- package/web/assets/toml-vGWfd6FD.js +1 -0
- package/web/assets/transform-CzGDKG_M.js +1 -0
- package/web/assets/tsx-COt5Ahok.js +1 -0
- package/web/assets/typescript-BPQ3VLAy.js +1 -0
- package/web/assets/vennDiagram-4TSXK5OY-AKJ7LXAN-CpJ6Pps5.js +34 -0
- package/web/assets/{vennDiagram-T6HMQDX7-CrYCZIBM.js → vennDiagram-T6HMQDX7-BMnYqRnM.js} +5 -5
- package/web/assets/vue-CHlpWS_5.js +1 -0
- package/web/assets/{wardleyDiagram-T6FBY63Y-C-bOW3CV.js → wardleyDiagram-T6FBY63Y-Lrf9MoT8.js} +2 -2
- package/web/assets/wardleyDiagram-VM6X3IG4-3B6A3BN5-DvOevU52.js +78 -0
- package/web/assets/xml-sdJ4AIDG.js +1 -0
- package/web/assets/xychartDiagram-ELKLHX3M-CRjc9-m8.js +7 -0
- package/web/assets/xychartDiagram-S5SC5T6Z-OBDNV6WG-BA4nAiFD.js +7 -0
- package/web/assets/yaml-Buea-lGh.js +1 -0
- package/web/index.html +3 -3
- package/web/pet.html +3 -3
- package/web/assets/abnfDiagram-N423BO3Z-BgfNjjBj.js +0 -1
- package/web/assets/api-web-DI50TDfG.js +0 -1
- package/web/assets/arc-RE7zZVS-.js +0 -1
- package/web/assets/channel-BhfjE8vu.js +0 -1
- package/web/assets/chunk-2GRJ4B5K-Cam0QBnt.js +0 -1
- package/web/assets/chunk-KBJHAD2P-BsrsrevO.js +0 -1
- package/web/assets/chunk-XXDRQBXY-BtPTE4dn.js +0 -1
- package/web/assets/classDiagram-JCYQIIEL-mL7PrSyJ.js +0 -1
- package/web/assets/classDiagram-v2-OCEON4UE-mL7PrSyJ.js +0 -1
- package/web/assets/cynefinDiagram-MW4NZA55-BVpP0nLh.js +0 -62
- package/web/assets/diagram-LBJQPF4R-B32aZsIz.js +0 -24
- package/web/assets/diagram-Q27KOJAE-DwwhihNN.js +0 -24
- package/web/assets/diagram-UB23O5K3-BdxB0b3R.js +0 -41
- package/web/assets/ebnfDiagram-BXEA7PRR-PAN05I_q.js +0 -1
- package/web/assets/ganttDiagram-PKOTCBZU-BqnBC4Aw.js +0 -292
- package/web/assets/index-D8iAKGNi.css +0 -1
- package/web/assets/infoDiagram-6WML65LV-B4sR-B3M.js +0 -2
- package/web/assets/linear-l0VVDmXM.js +0 -1
- package/web/assets/main-5hScumEl.js +0 -792
- package/web/assets/mermaid.core-DZ6Z8vWa.js +0 -314
- package/web/assets/pegDiagram-VL7TDLO6-CANPvqfq.js +0 -1
- package/web/assets/pieDiagram-7S7Q4E2Y-HpK8uEiY.js +0 -39
- package/web/assets/railroadDiagram-AXF67PYL-DA507-no.js +0 -1
- package/web/assets/sankeyDiagram-W5VNT64P-WV_Swfln.js +0 -40
- package/web/assets/sizeCapture-X5ZJPWSS-Ba9eWTxX.js +0 -1
- package/web/assets/stateDiagram-OKZ733FA-lonr0yA-.js +0 -1
- package/web/assets/stateDiagram-v2-UEYNNEHI-Dt1VC3TV.js +0 -1
- package/web/assets/swimlanes-SLNWSIFB-BSQT7r6F.js +0 -2
- package/web/assets/swimlanesDiagram-ULZ7WXOC-Dhdnb080.js +0 -8
- package/web/assets/xychartDiagram-ELKLHX3M-BB-TjDfD.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const S="npm2url/dist/index.cjs",b={jsdelivr:e=>`https://cdn.jsdelivr.net/npm/${e}`,unpkg:e=>`https://unpkg.com/${e}`};async function k(e,t){const n=await fetch(e,{signal:t});if(!n.ok)throw n;await n.text()}class J{constructor(){this.providers={...b},this.provider="jsdelivr"}async getFastestProvider(t=5e3,n=S){const r=new AbortController;let s=0;try{return await new Promise((o,i)=>{Promise.all(Object.entries(this.providers).map(async([a,m])=>{try{await k(m(n),r.signal),o(a)}catch{}})).then(()=>i(new Error("All providers failed"))),s=setTimeout(i,t,new Error("Timed out"))})}finally{r.abort(),clearTimeout(s)}}async findFastestProvider(t,n){return this.provider=await this.getFastestProvider(t,n),this.provider}setProvider(t,n){n?this.providers[t]=n:delete this.providers[t]}getFullUrl(t,n=this.provider){if(t.includes("://"))return t;const r=this.providers[n];if(!r)throw new Error(`Provider ${n} not found`);return r(t)}}class z{constructor(){this.listeners=[]}tap(t){return this.listeners.push(t),()=>this.revoke(t)}revoke(t){const n=this.listeners.indexOf(t);n>=0&&this.listeners.splice(n,1)}revokeAll(){this.listeners.splice(0)}call(...t){for(const n of this.listeners)n(...t)}}const T=Math.random().toString(36).slice(2,8);let f=0;function B(){return f+=1,`mm-${T}-${f}`}function R(){}function Y(e,t){const n=(r,s)=>t(r,()=>{var o;return(o=r.children)==null?void 0:o.map(i=>n(i,r))},s);return n(e)}function q(e,...t){const n=(e||"").split(" ").filter(Boolean);return t.forEach(r=>{r&&n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function G(e,t){return(...n)=>t(e,...n)}function y(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function N(e){const t={};return function(...r){const s=`${r[0]}`;let o=t[s];return o||(o={value:e(...r)},t[s]=o),o.value}}function K(e,t){const n={timer:0};function r(){n.timer&&(window.clearTimeout(n.timer),n.timer=0)}function s(){r(),n.args&&(n.result=e(...n.args))}return function(...i){return r(),n.args=i,n.timer=window.setTimeout(s,t),n.result}}/*! @gera2ld/jsx-dom v2.2.2 | ISC License */const g=1,v=2,j="http://www.w3.org/2000/svg",l="http://www.w3.org/1999/xlink",A={show:l,actuate:l,href:l},E=e=>typeof e=="string"||typeof e=="number",P=e=>(e==null?void 0:e.vtype)===g,x=e=>(e==null?void 0:e.vtype)===v;function C(e,t,...n){return t=Object.assign({},t,{children:n.length===1?n[0]:n}),I(e,t)}function I(e,t){let n;if(typeof e=="string")n=g;else if(typeof e=="function")n=v;else throw new Error("Invalid VNode type");return{vtype:n,type:e,props:t}}function F(e){return e.children}const _={isSvg:!1};function h(e,t){Array.isArray(t)||(t=[t]),t=t.filter(Boolean),t.length&&e.append(...t)}function L(e,t,n){for(const r in t)if(!(r==="key"||r==="children"||r==="ref"))if(r==="dangerouslySetInnerHTML")e.innerHTML=t[r].__html;else if(r==="innerHTML"||r==="textContent"||r==="innerText"||r==="value"&&["textarea","select"].includes(e.tagName)){const s=t[r];s!=null&&(e[r]=s)}else r.startsWith("on")?e[r.toLowerCase()]=t[r]:M(e,r,t[r],n.isSvg)}const O={className:"class",labelFor:"for"};function M(e,t,n,r){if(t=O[t]||t,n===!0)e.setAttribute(t,"");else if(n===!1)e.removeAttribute(t);else{const s=r?A[t]:void 0;s!==void 0?e.setAttributeNS(s,t,n):e.setAttribute(t,n)}}function V(e){return e.reduce((t,n)=>t.concat(n),[])}function u(e,t){return Array.isArray(e)?V(e.map(n=>u(n,t))):d(e,t)}function d(e,t=_){if(e==null||typeof e=="boolean")return null;if(e instanceof Node)return e;if(x(e)){const{type:n,props:r}=e;if(n===F){const o=document.createDocumentFragment();if(r.children){const i=u(r.children,t);h(o,i)}return o}const s=n(r);return d(s,t)}if(E(e))return document.createTextNode(`${e}`);if(P(e)){let n;const{type:r,props:s}=e;if(!t.isSvg&&r==="svg"&&(t=Object.assign({},t,{isSvg:!0})),t.isSvg?n=document.createElementNS(j,r):n=document.createElement(r),L(n,s,t),s.children){let i=t;t.isSvg&&r==="foreignObject"&&(i=Object.assign({},i,{isSvg:!1}));const a=u(s.children,i);a!=null&&h(n,a)}const{ref:o}=s;return typeof o=="function"&&o(n),n}throw new Error("mount: Invalid Vnode!")}function $(e){return d(e)}function c(...e){return $(C(...e))}const U=N(e=>{document.head.append(c("link",{rel:"preload",as:"script",href:e}))}),p={},w={};async function D(e,t){var n;const r=e.type==="script"&&((n=e.data)==null?void 0:n.src)||"";if(e.loaded||(e.loaded=p[r]),!e.loaded){const s=y();if(e.loaded=s.promise,e.type==="script"&&(document.head.append(c("script",{...e.data,onLoad:()=>s.resolve(),onError:s.reject})),r?p[r]=e.loaded:s.resolve()),e.type==="iife"){const{fn:o,getParams:i}=e.data;o(...(i==null?void 0:i(t))||[]),s.resolve()}}await e.loaded}async function H(e){const t=e.type==="stylesheet"&&e.data.href||"";if(e.loaded||(e.loaded=w[t]),!e.loaded){const n=y();e.loaded=n.promise,t&&(w[t]=e.loaded),e.type==="style"?(document.head.append(c("style",{textContent:e.data})),n.resolve()):t&&(document.head.append(c("link",{rel:"stylesheet",...e.data})),fetch(t).then(r=>{if(r.ok)return r.text();throw r}).then(()=>n.resolve(),n.reject))}await e.loaded}async function W(e,t){e.forEach(n=>{var r;n.type==="script"&&((r=n.data)!=null&&r.src)&&U(n.data.src)}),t={getMarkmap:()=>window.markmap,...t};for(const n of e)await D(n,t)}async function X(e){await Promise.all(e.map(t=>H(t)))}function Q(e){return{type:"script",data:{src:e}}}function Z(e){return{type:"stylesheet",data:{href:e}}}export{z as H,J as U,q as a,W as b,G as c,K as d,Z as e,Q as f,B as g,X as l,R as n,Y as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function x(n){var e=0,i=n.children,r=i&&i.length;if(!r)e=1;else for(;--r>=0;)e+=i[r].value;n.value=e}function N(){return this.eachAfter(x)}function I(n,e){let i=-1;for(const r of this)n.call(e,r,++i,this);return this}function T(n,e){for(var i=this,r=[i],u,o,a=-1;i=r.pop();)if(n.call(e,i,++a,this),u=i.children)for(o=u.length-1;o>=0;--o)r.push(u[o]);return this}function V(n,e){for(var i=this,r=[i],u=[],o,a,c,l=-1;i=r.pop();)if(u.push(i),o=i.children)for(a=0,c=o.length;a<c;++a)r.push(o[a]);for(;i=u.pop();)n.call(e,i,++l,this);return this}function C(n,e){let i=-1;for(const r of this)if(n.call(e,r,++i,this))return r}function L(n){return this.eachAfter(function(e){for(var i=+n(e.data)||0,r=e.children,u=r&&r.length;--u>=0;)i+=r[u].value;e.value=i})}function S(n){return this.eachBefore(function(e){e.children&&e.children.sort(n)})}function D(n){for(var e=this,i=O(e,n),r=[e];e!==i;)e=e.parent,r.push(e);for(var u=r.length;n!==i;)r.splice(u,0,n),n=n.parent;return r}function O(n,e){if(n===e)return n;var i=n.ancestors(),r=e.ancestors(),u=null;for(n=i.pop(),e=r.pop();n===e;)u=n,n=i.pop(),e=r.pop();return u}function b(){for(var n=this,e=[n];n=n.parent;)e.push(n);return e}function j(){return Array.from(this)}function z(){var n=[];return this.eachBefore(function(e){e.children||n.push(e)}),n}function E(){var n=this,e=[];return n.each(function(i){i!==n&&e.push({source:i.parent,target:i})}),e}function*H(){var n=this,e,i=[n],r,u,o;do for(e=i.reverse(),i=[];n=e.pop();)if(yield n,r=n.children)for(u=0,o=r.length;u<o;++u)i.push(r[u]);while(i.length)}function q(n,e){n instanceof Map?(n=[void 0,n],e===void 0&&(e=G)):e===void 0&&(e=F);for(var i=new A(n),r,u=[i],o,a,c,l;r=u.pop();)if((a=e(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,c=l-1;c>=0;--c)u.push(o=a[c]=new A(a[c])),o.parent=r,o.depth=r.depth+1;return i.eachBefore(K)}function Z(){return q(this).eachBefore(J)}function F(n){return n.children}function G(n){return Array.isArray(n)?n[1]:null}function J(n){n.data.value!==void 0&&(n.value=n.data.value),n.data=n.data.data}function K(n){var e=0;do n.height=e;while((n=n.parent)&&n.height<++e)}function A(n){this.data=n,this.depth=this.height=0,this.parent=null}A.prototype=q.prototype={constructor:A,count:N,each:I,eachAfter:V,eachBefore:T,find:C,sum:L,sort:S,path:D,ancestors:b,descendants:j,leaves:z,links:E,copy:Z,[Symbol.iterator]:H};function P(n){if(typeof n!="function")throw new Error;return n}function _(){return 0}function B(n){return function(){return n}}function Q(n){n.x0=Math.round(n.x0),n.y0=Math.round(n.y0),n.x1=Math.round(n.x1),n.y1=Math.round(n.y1)}function U(n,e,i,r,u){for(var o=n.children,a,c=-1,l=o.length,v=n.value&&(r-e)/n.value;++c<l;)a=o[c],a.y0=i,a.y1=u,a.x0=e,a.x1=e+=a.value*v}function W(n,e,i,r,u){for(var o=n.children,a,c=-1,l=o.length,v=n.value&&(u-i)/n.value;++c<l;)a=o[c],a.x0=e,a.x1=r,a.y0=i,a.y1=i+=a.value*v}var X=(1+Math.sqrt(5))/2;function Y(n,e,i,r,u,o){for(var a=[],c=e.children,l,v,h=0,m=0,t=c.length,d,p,s=e.value,f,g,w,M,k,R,y;h<t;){d=u-i,p=o-r;do f=c[m++].value;while(!f&&m<t);for(g=w=f,R=Math.max(p/d,d/p)/(s*n),y=f*f*R,k=Math.max(w/y,y/g);m<t;++m){if(f+=v=c[m].value,v<g&&(g=v),v>w&&(w=v),y=f*f*R,M=Math.max(w/y,y/g),M>k){f-=v;break}k=M}a.push(l={value:f,dice:d<p,children:c.slice(h,m)}),l.dice?U(l,i,r,u,s?r+=p*f/s:o):W(l,i,r,s?i+=d*f/s:u,o),s-=f,h=m}return a}const $=(function n(e){function i(r,u,o,a,c){Y(e,r,u,o,a,c)}return i.ratio=function(r){return n((r=+r)>1?r:1)},i})(X);function nn(){var n=$,e=!1,i=1,r=1,u=[0],o=_,a=_,c=_,l=_,v=_;function h(t){return t.x0=t.y0=0,t.x1=i,t.y1=r,t.eachBefore(m),u=[0],e&&t.eachBefore(Q),t}function m(t){var d=u[t.depth],p=t.x0+d,s=t.y0+d,f=t.x1-d,g=t.y1-d;f<p&&(p=f=(p+f)/2),g<s&&(s=g=(s+g)/2),t.x0=p,t.y0=s,t.x1=f,t.y1=g,t.children&&(d=u[t.depth+1]=o(t)/2,p+=v(t)-d,s+=a(t)-d,f-=c(t)-d,g-=l(t)-d,f<p&&(p=f=(p+f)/2),g<s&&(s=g=(s+g)/2),n(t,p,s,f,g))}return h.round=function(t){return arguments.length?(e=!!t,h):e},h.size=function(t){return arguments.length?(i=+t[0],r=+t[1],h):[i,r]},h.tile=function(t){return arguments.length?(n=P(t),h):n},h.padding=function(t){return arguments.length?h.paddingInner(t).paddingOuter(t):h.paddingInner()},h.paddingInner=function(t){return arguments.length?(o=typeof t=="function"?t:B(+t),h):o},h.paddingOuter=function(t){return arguments.length?h.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):h.paddingTop()},h.paddingTop=function(t){return arguments.length?(a=typeof t=="function"?t:B(+t),h):a},h.paddingRight=function(t){return arguments.length?(c=typeof t=="function"?t:B(+t),h):c},h.paddingBottom=function(t){return arguments.length?(l=typeof t=="function"?t:B(+t),h):l},h.paddingLeft=function(t){return arguments.length?(v=typeof t=="function"?t:B(+t),h):v},h}export{q as h,nn as t};
|
|
@@ -50,4 +50,4 @@ Error generating stack: `+a.message+`
|
|
|
50
50
|
L${(100+Math.cos(x)*D).toFixed(1)},${(135+Math.sin(x)*D).toFixed(1)}
|
|
51
51
|
L${(100+Math.cos((x+T)/2)*(D-1)).toFixed(1)},${(135+Math.sin((x+T)/2)*(D-1)).toFixed(1)}
|
|
52
52
|
L${(100+Math.cos(T)*D).toFixed(1)},${(135+Math.sin(T)*D).toFixed(1)}
|
|
53
|
-
L${(100+Math.cos(T)*N).toFixed(1)},${(135+Math.sin(T)*N).toFixed(1)} Z`};return c.jsxs("g",{children:[c.jsx("path",{d:"M100,117 L114,135 L100,153 L86,135 Z",fill:lh,stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),Array.from({length:6},(p,x)=>c.jsx("path",{d:r(x),fill:x<d?Xa:_y,stroke:ol,strokeWidth:"1.4",strokeLinejoin:"round",opacity:x<d?1:.55},x)),c.jsx("circle",{cx:"100",cy:"135",r:"3.2",fill:d>=6?Ya:Xa,stroke:ol,strokeWidth:"1.6"}),c.jsx("path",{d:"M94,124 L98,119",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",opacity:"0.8"}),c.jsx("rect",{x:"0",y:"0",width:"0",height:"0",fill:"none","data-uid":s})]})}function Oy(f,s){switch(f){case"A":return c.jsx("path",{d:"M92,74.5 L108,74.5 L113,78.5 L108,85.5 L92,85.5 L87,78.5 Z M95,77.5 L105,77.5 L105,83.5 L95,83.5 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M90,76.5 L110,76.5 L113,80 L110,83.5 L90,83.5 L87,80 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M90,79 L110,79 L111.5,80.8 L110,82.6 L90,82.6 L88.5,80.8 Z",fill:s.ink});case"O":return c.jsx("path",{d:"M100,73.5 L106,80.5 L100,86 L94,80.5 Z M100,77.5 L102.8,80.5 L100,83.4 L97.2,80.5 Z",fill:s.ink,fillRule:"evenodd"});case"U":return c.jsx("path",{d:"M100,74 L104,80.5 L100,85.5 L96,80.5 Z M100,78 L101.8,80.5 L100,83 L98.2,80.5 Z",fill:s.ink,fillRule:"evenodd"});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M86,76 L114,76 L112.5,82.6 L87.5,82.6 Z",fill:s.ink}),c.jsx("path",{d:"M90,76.4 L95.4,76.4 L94.4,82.2 L91.2,82.2 Z",fill:"#FFFFFF"}),c.jsx("path",{d:"M98,76.4 L103,76.4 L102.2,82.2 L99,82.2 Z",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("path",{d:"M105.6,76.4 L110.4,76.4 L109.4,82.2 L106.4,82.2 Z",fill:"#FFFFFF",opacity:"0.75"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74.5 L108,74.5 L113,78.5 L108,85.5 L92,85.5 L87,78.5 Z M95,77.5 L105,77.5 L105,83.5 L95,83.5 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96",y:"78",width:"8",height:"3.2",rx:"1.6",fill:s.pupil}),c.jsx("rect",{x:"98",y:"78.8",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74.5 L108,74.5 L112,78 L108,84.5 L92,84.5 L88,78 Z",fill:s.ink}),c.jsx("path",{d:"M93.5,76.2 L106.5,76.2 L105.8,79.4 L94.2,79.4 Z",fill:"#FFFFFF"}),c.jsx("rect",{x:"95.5",y:"80.6",width:"9",height:"2.6",rx:"1.3",fill:s.pupil})]});default:return c.jsx("path",{d:"M92,79.5 L100,83.5 L108,79.5",fill:"none",stroke:s.ink,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"})}}function Ny({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"6"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?Ya:Xa,opacity:"0.35"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?Ya:Xa})]}),c.jsx("path",{d:"M90,158 L110,158 L104,171 L96,171 Z",fill:"#2E3A4A",stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z",fill:rs}),c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z",fill:os,transform:"translate(-5 -5)"})]}),c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z",fill:"none",stroke:ol,strokeWidth:"5",strokeLinejoin:"round"}),c.jsx(Ml,{id:`${f}-body`,x:58,y:110,w:84,h:46,t:4,light:"rgba(255,255,255,0.6)",dark:"rgba(24,58,82,0.4)"}),c.jsx(Dy,{energyRatio:x,uid:f}),c.jsx("circle",{cx:"74",cy:"150",r:"1.5",fill:ol,opacity:"0.45"}),c.jsx("circle",{cx:"126",cy:"150",r:"1.5",fill:ol,opacity:"0.45"})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("path",{d:"M40,58 L36,38 L44,50 Z",fill:T?Ya:Xa,stroke:ol,strokeWidth:"3.5",strokeLinejoin:"round"}),c.jsx("path",{d:"M46,56 L46,42 L52,52 Z",fill:T?Ya:os,stroke:ol,strokeWidth:"3",strokeLinejoin:"round"}),T&&c.jsx("path",{d:"M28,34 l3,-3 m-1,7 l3,-3 m-9,-1 l3,-3",stroke:Ya,strokeWidth:"2.2",strokeLinecap:"round"}),!T&&c.jsx("circle",{cx:"40",cy:"38",r:"8",fill:Xa,opacity:"0.22",className:"cp-ant-glow"})]}),c.jsx("path",{d:"M42,60 L42,84 L48,88 L54,84 L54,60 L48,56 Z",fill:hs,stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),c.jsx("path",{d:"M146,60 L146,84 L152,88 L158,84 L158,60 L152,56 Z",fill:hs,stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z",fill:rs}),c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z",fill:os,transform:"translate(-5 -5)"}),c.jsx("path",{d:"M60,34 L74,28 M132,28 L146,34",stroke:"#FFFFFF",strokeWidth:"2.4",strokeLinecap:"round",opacity:"0.75"})]}),c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z",fill:"none",stroke:ol,strokeWidth:"5",strokeLinejoin:"round"}),c.jsx(Ml,{id:`${f}-helm`,x:50,y:26,w:100,h:70,t:4,light:"rgba(255,255,255,0.55)",dark:"rgba(24,58,82,0.38)"}),c.jsx("path",{d:"M58,36 L96,36 L90,45 L54,45 Z",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("path",{d:"M104,36 L118,36 L112,45 L102,45 Z",fill:"#FFFFFF",opacity:"0.5"}),c.jsx("path",{d:"M58,48 h84 a8,8 0 0 1 8,8 v30 a8,8 0 0 1 -8,8 h-84 a8,8 0 0 1 -8,-8 v-30 a8,8 0 0 1 8,-8 Z",fill:lh,stroke:ol,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"6",fill:Ly}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:hs,transform:"translate(0 15)"}),c.jsx("path",{d:"M118,54 L136,54 L108,88 L90,88 Z",fill:"#FFFFFF",opacity:"0.18"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:ss,viseme:r,openScale:p,renderMouth:Oy}),c.jsx(eu,{flags:N,refs:s,p:ss})]})]}),N.proud&&c.jsx(au,{p:ss}),c.jsx(nu,{refs:s,armFill:rs,out:ol})]})]})}const ds={out:"#2A3326",ink:"#2F5D3A",pupil:"#9BEFA9",wave:"#8FDBA0",crown:"#FFC800",crownD:"#D9A400"},ie="#9BEFA9",ys="#57BD74",Ms="#3E8E55",Uy="#F4FBE8",eh="#D7F0C8",ah="#3A4A34",ms="#FFC800",Jt="#2A3326";function Cy({energyRatio:f}){const s=Math.min(1,Math.max(0,f)),d=10+s*30,r=2+s*6;return c.jsxs("g",{children:[c.jsx("circle",{cx:"100",cy:"135",r:"16.5",fill:ah,stroke:Jt,strokeWidth:"4.5"}),c.jsx("circle",{cx:"100",cy:"135",r:"12.5",fill:eh}),c.jsx("path",{d:`M100,141 Q${100-s*2},${135-r} 100,${129-r}`,fill:"none",stroke:Ms,strokeWidth:"3",strokeLinecap:"round"}),c.jsx("g",{transform:`rotate(${-d} 100 133)`,children:c.jsx("path",{d:"M100,133 C95,127 87,127 85,131 C88,136 96,137 100,133 Z",fill:ie,stroke:Jt,strokeWidth:"2.6",strokeLinejoin:"round"})}),c.jsx("g",{transform:`rotate(${d} 100 133)`,children:c.jsx("path",{d:"M100,133 C105,127 113,127 115,131 C112,136 104,137 100,133 Z",fill:ie,stroke:Jt,strokeWidth:"2.6",strokeLinejoin:"round"})}),c.jsx("ellipse",{cx:"100",cy:"140",rx:"5.5",ry:"4",fill:"#7A5A3A",stroke:Jt,strokeWidth:"2.4"}),c.jsx("path",{d:"M95,130.5 Q97,128.5 99.5,129",stroke:"#FFFFFF",strokeWidth:"1.8",fill:"none",strokeLinecap:"round",opacity:"0.7"})]})}function wy(f,s){switch(f){case"A":return c.jsx("path",{d:"M92,74 Q100,71 108,74 Q110,83 100,86 Q90,83 92,74 Z M96,76 Q100,78 104,76 Q103,80 100,81.5 Q97,80 96,76 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M91,76.5 Q100,74 109,76.5 Q109,82 100,83 Q91,82 91,76.5 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M91,78.5 Q100,77 109,78.5 Q109,81.5 100,82.2 Q91,81.5 91,78.5 Z",fill:s.ink});case"O":return c.jsx("path",{d:"M100,72.5 C105,72.5 107.5,77 107.5,80 C107.5,83.5 104.5,86.5 100,86.5 C95.5,86.5 92.5,83.5 92.5,80 C92.5,77 95,72.5 100,72.5 Z M100,77 C102.5,77 104,78.5 104,80.5 C104,82.5 102.3,83.8 100,83.8 C97.7,83.8 96,82.5 96,80.5 C96,78.5 97.5,77 100,77 Z",fill:s.ink,fillRule:"evenodd"});case"U":return c.jsx("path",{d:"M100,73 C103,73 105,76.5 105,80 C105,83.3 103,86 100,86 C97,86 95,83.3 95,80 C95,76.5 97,73 100,73 Z M100,76.8 C101.3,76.8 102.2,78.3 102.2,80.3 C102.2,82.3 101.3,83.6 100,83.6 C98.7,83.6 97.8,82.3 97.8,80.3 C97.8,78.3 98.7,76.8 100,76.8 Z",fill:s.ink,fillRule:"evenodd"});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M87,77 Q100,75 113,77 Q113.5,82.5 100,83 Q86.5,82.5 87,77 Z",fill:s.ink}),c.jsx("rect",{x:"90.5",y:"77.8",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF"}),c.jsx("rect",{x:"96.5",y:"77.7",width:"1.8",height:"3.4",rx:"0.9",fill:"#FFFFFF",opacity:"0.92"}),c.jsx("rect",{x:"102.5",y:"77.8",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF",opacity:"0.84"}),c.jsx("rect",{x:"108",y:"77.9",width:"1.8",height:"3",rx:"0.9",fill:"#FFFFFF",opacity:"0.72"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74 Q100,71 108,74 Q110,83 100,86 Q90,83 92,74 Z M96,76 Q100,78 104,76 Q103,80 100,81.5 Q97,80 96,76 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96",y:"76.6",width:"8",height:"3.2",rx:"1.6",fill:s.pupil}),c.jsx("rect",{x:"98",y:"77.4",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M93.5,77 Q100,74.5 106.5,77 Q107,82.5 100,83.8 Q93,82.5 93.5,77 Z",fill:s.ink}),c.jsx("rect",{x:"94.5",y:"77.2",width:"11",height:"2.4",rx:"1.2",fill:"#FFFFFF"}),c.jsx("rect",{x:"95.5",y:"80.4",width:"9",height:"2.6",rx:"1.3",fill:s.pupil})]});default:return c.jsx("path",{d:"M92,79.5 Q100,85.5 108,79.5",fill:"none",stroke:s.ink,strokeWidth:"3.5",strokeLinecap:"round"})}}function Ry({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"12"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?ms:ie,opacity:"0.3"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?ms:ie})]}),c.jsx("path",{d:"M88,158 Q100,152 112,158 L106,171 Q100,174 94,171 Z",fill:"#3A4A34",stroke:Jt,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22",fill:ys}),c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22",fill:ie,transform:"translate(-4 -4)"})]}),c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22",fill:"none",stroke:Jt,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-body`,x:64,y:110,w:72,h:50,t:4,light:"rgba(255,255,255,0.42)",dark:"rgba(38,74,46,0.4)"}),c.jsx(Cy,{energyRatio:x}),c.jsx("circle",{cx:"73",cy:"150",r:"1.6",fill:Jt,opacity:"0.45"}),c.jsx("circle",{cx:"127",cy:"150",r:"1.6",fill:Jt,opacity:"0.45"})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("path",{d:"M43,60 Q40,50 44,42",fill:"none",stroke:Jt,strokeWidth:"4",strokeLinecap:"round"}),T?c.jsxs("g",{children:[Array.from({length:5},(D,E)=>c.jsx("ellipse",{cx:"44",cy:"33",rx:"4",ry:"7.5",fill:ms,stroke:Jt,strokeWidth:"2",transform:`rotate(${E*72} 44 40)`},E)),c.jsx("circle",{cx:"44",cy:"40",r:"4.5",fill:"#FFF3C4",stroke:Jt,strokeWidth:"2"})]}):c.jsxs("g",{children:[c.jsx("ellipse",{cx:"44",cy:"39",rx:"5.5",ry:"7",fill:ie,stroke:Jt,strokeWidth:"3"}),c.jsx("path",{d:"M44,33 Q46.5,39 44,45",fill:"none",stroke:Ms,strokeWidth:"1.8"})]})]}),c.jsx("path",{d:"M48,62 C36,56 30,62 32,70 C38,76 48,74 48,62 Z",fill:ie,stroke:Jt,strokeWidth:"4",strokeLinejoin:"round"}),c.jsx("path",{d:"M152,62 C164,56 170,62 168,70 C162,76 152,74 152,62 Z",fill:ie,stroke:Jt,strokeWidth:"4",strokeLinejoin:"round"}),c.jsx("path",{d:"M36,62 Q42,66 46,68 M164,62 Q158,66 154,68",stroke:Ms,strokeWidth:"1.8",fill:"none",strokeLinecap:"round"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42",fill:ys}),c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42",fill:ie,transform:"translate(-5 -5)"})]}),c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42",fill:"none",stroke:Jt,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-helm`,x:44,y:27,w:112,h:84,t:4,light:"rgba(255,255,255,0.36)",dark:"rgba(38,74,46,0.36)"}),c.jsx("path",{d:"M58,37 Q86,31 104,38 L96,47 Q68,46 58,37 Z",fill:"#FFFFFF",opacity:"0.88"}),c.jsx("circle",{cx:"118",cy:"41",r:"4",fill:"#FFFFFF",opacity:"0.55"}),c.jsx("rect",{x:"58",y:"48",width:"84",height:"46",rx:"16",fill:ah,stroke:Jt,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"12",fill:Uy}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:eh,transform:"translate(0 15)"}),c.jsx("path",{d:"M120,54 L136,54 L106,88 L90,88 Z",fill:"#FFFFFF",opacity:"0.2"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:ds,viseme:r,openScale:p,renderMouth:wy}),c.jsx(eu,{flags:N,refs:s,p:ds})]})]}),N.proud&&c.jsx(au,{p:ds}),c.jsx(nu,{refs:s,armFill:ys,out:Jt})]})]})}const gs={out:"#221C38",ink:"#FFEFC2",pupil:"#8B7BF0",wave:"#B7ACFF",crown:"#FFD75E",crownD:"#D9A400"},Za="#8B7BF0",ps="#5D4FD1",Hy="#241E4E",nh="#3A2F6E",ka="#1A1440",Vn="#FFEFC2",Ba="#FFD75E",jl="#221C38";function Zy({energyRatio:f,uid:s}){const d=Math.min(1,Math.max(0,f)),r=(1-d)*26;return c.jsxs("g",{children:[c.jsx("circle",{cx:"100",cy:"135",r:"16.5",fill:ka,stroke:jl,strokeWidth:"4.5"}),c.jsx("circle",{cx:"100",cy:"135",r:"12.5",fill:nh}),c.jsxs("g",{clipPath:`url(#${s}-moon)`,children:[c.jsx("circle",{cx:"100",cy:"135",r:"11.5",fill:Vn}),c.jsx("circle",{cx:100-r,cy:"135",r:"12.5",fill:ka})]}),c.jsx("circle",{cx:"100",cy:"135",r:"12.5",fill:"none",stroke:jl,strokeWidth:"2"}),c.jsxs("g",{opacity:.35*d,children:[c.jsx("circle",{cx:"96",cy:"131",r:"2",fill:ka}),c.jsx("circle",{cx:"104",cy:"138",r:"1.5",fill:ka}),c.jsx("circle",{cx:"99",cy:"140",r:"1.1",fill:ka})]})]})}function By(f,s){switch(f){case"A":return c.jsx("path",{d:"M91,74.5 h18 a5,5 0 0 1 5,5 v2.6 a5,5 0 0 1 -5,5 h-18 a5,5 0 0 1 -5,-5 v-2.6 a5,5 0 0 1 5,-5 Z M95,77.5 h10 v5.6 h-10 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M90,77 h20 a3.2,3.2 0 0 1 0,6.4 h-20 a3.2,3.2 0 0 1 0,-6.4 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M90,79.5 h20 a1.9,1.9 0 0 1 0,3.8 h-20 a1.9,1.9 0 0 1 0,-3.8 Z",fill:s.ink});case"O":return c.jsxs("g",{fill:"none",children:[c.jsx("circle",{cx:"100",cy:"79.5",r:"6.4",stroke:s.ink,strokeWidth:"4"}),c.jsx("circle",{cx:"100",cy:"79.5",r:"1.6",fill:s.ink,stroke:"none"})]});case"U":return c.jsx("g",{fill:"none",children:c.jsx("circle",{cx:"100",cy:"79.5",r:"4.4",stroke:s.ink,strokeWidth:"3.6"})});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M87,76.5 h26 a2.4,2.4 0 0 1 2.4,2.4 v1.2 a2.4,2.4 0 0 1 -2.4,2.4 h-26 a2.4,2.4 0 0 1 -2.4,-2.4 v-1.2 a2.4,2.4 0 0 1 2.4,-2.4 Z",fill:s.ink}),c.jsx("rect",{x:"90.5",y:"78.1",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF"}),c.jsx("rect",{x:"96.5",y:"78.1",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF",opacity:"0.92"}),c.jsx("rect",{x:"102.5",y:"78.1",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF",opacity:"0.84"}),c.jsx("rect",{x:"108",y:"78.1",width:"1.8",height:"3",rx:"0.9",fill:"#FFFFFF",opacity:"0.72"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M91,74.5 h18 a5,5 0 0 1 5,5 v2.6 a5,5 0 0 1 -5,5 h-18 a5,5 0 0 1 -5,-5 v-2.6 a5,5 0 0 1 5,-5 Z M95,77.5 h10 v5.6 h-10 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96",y:"77.2",width:"8",height:"3.2",rx:"1.6",fill:s.pupil}),c.jsx("rect",{x:"98",y:"78",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74.8 h16 a5,5 0 0 1 5,5 v2.4 a5,5 0 0 1 -5,5 h-16 a5,5 0 0 1 -5,-5 v-2.4 a5,5 0 0 1 5,-5 Z",fill:s.ink}),c.jsx("rect",{x:"93.5",y:"76.6",width:"13",height:"2.4",rx:"1.2",fill:"#FFFFFF"}),c.jsx("rect",{x:"95.5",y:"79.6",width:"9",height:"2.6",rx:"1.3",fill:s.pupil})]});default:return c.jsx("path",{d:"M92,79.5 Q100,85 108,79.5",fill:"none",stroke:s.ink,strokeWidth:"3.5",strokeLinecap:"round"})}}function Fy({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"9"})}),c.jsx("clipPath",{id:`${f}-moon`,children:c.jsx("circle",{cx:"100",cy:"135",r:"12.5"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?Ba:Za,opacity:"0.38"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?Ba:Za})]}),c.jsx("path",{d:"M88,158 L112,158 L106,171 L94,171 Z",fill:"#2A2248",stroke:jl,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20",fill:ps}),c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20",fill:Za,transform:"translate(-4 -4)"})]}),c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20",fill:"none",stroke:jl,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-body`,x:66,y:110,w:68,h:50,t:4,light:"rgba(196,181,255,0.34)",dark:"rgba(10,6,32,0.5)"}),c.jsx(Zy,{energyRatio:x,uid:f}),c.jsx("circle",{cx:"76",cy:"150",r:"1.5",fill:jl,opacity:"0.5"}),c.jsx("circle",{cx:"124",cy:"150",r:"1.5",fill:jl,opacity:"0.5"})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("ellipse",{cx:"42",cy:"44",rx:"13",ry:"5.5",fill:"none",stroke:jl,strokeWidth:"3.5",transform:"rotate(-24 42 44)"}),c.jsx("circle",{cx:"49",cy:"39",r:"5",fill:T?Ba:Vn,stroke:jl,strokeWidth:"3"}),T&&c.jsx("path",{d:"M56,34 L68,26 M57,41 L71,38 M52,30 L58,20",stroke:Ba,strokeWidth:"2.4",strokeLinecap:"round"})]}),c.jsx("circle",{cx:"44",cy:"72",r:"8",fill:Za,stroke:jl,strokeWidth:"4"}),c.jsx("ellipse",{cx:"44",cy:"72",rx:"13",ry:"4.5",fill:"none",stroke:Ba,strokeWidth:"2.4",transform:"rotate(-18 44 72)"}),c.jsx("circle",{cx:"156",cy:"72",r:"8",fill:Za,stroke:jl,strokeWidth:"4"}),c.jsx("ellipse",{cx:"156",cy:"72",rx:"13",ry:"4.5",fill:"none",stroke:Ba,strokeWidth:"2.4",transform:"rotate(18 156 72)"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z",fill:ps}),c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z",fill:Za,transform:"translate(-5 -5)"}),c.jsx("circle",{cx:"66",cy:"42",r:"1.6",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("circle",{cx:"82",cy:"33",r:"1.2",fill:"#FFFFFF",opacity:"0.75"}),c.jsx("circle",{cx:"130",cy:"36",r:"1.7",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("circle",{cx:"118",cy:"30",r:"1",fill:"#FFFFFF",opacity:"0.6"}),c.jsx("path",{d:"M94,28 l1.6,3.2 3.4,0.5 -2.5,2.4 0.6,3.4 -3.1,-1.7 -3.1,1.7 0.6,-3.4 -2.5,-2.4 3.4,-0.5 Z",fill:"#FFFFFF",opacity:"0.85"})]}),c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z",fill:"none",stroke:jl,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-helm`,x:48,y:26,w:104,h:70,t:4,light:"rgba(196,181,255,0.3)",dark:"rgba(10,6,32,0.45)"}),c.jsx("path",{d:"M56,40 Q88,28 110,34 L102,44 Q72,40 56,46 Z",fill:"#FFFFFF",opacity:"0.8"}),c.jsx("rect",{x:"58",y:"48",width:"84",height:"46",rx:"12",fill:ka,stroke:jl,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"9",fill:Hy}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:nh,transform:"translate(0 15)"}),c.jsx("circle",{cx:"74",cy:"60",r:"1",fill:Vn,opacity:"0.8"}),c.jsx("circle",{cx:"128",cy:"82",r:"1.2",fill:Vn,opacity:"0.6"}),c.jsx("circle",{cx:"86",cy:"84",r:"0.8",fill:Vn,opacity:"0.5"}),c.jsx("path",{d:"M118,54 L136,54 L106,88 L92,88 Z",fill:"#FFFFFF",opacity:"0.08"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:gs,viseme:r,openScale:p,renderMouth:By}),c.jsx(eu,{flags:N,refs:s,p:gs})]})]}),N.proud&&c.jsx(au,{p:gs}),c.jsx(nu,{refs:s,armFill:ps,out:jl})]})]})}const xs={out:"#2F2A22",ink:"#2B2B2B",pupil:"#F7F2E6",wave:"#8FB8C9",crown:"#FFC800",crownD:"#D9A400"},Ti="#F7F2E6",Li="#DCD2B8",Qy="#FBF7EC",Fa="#EFE7D2",_i="#4A4234",Kn="#E8543F",uh="#B8392A",Es="#3A342A",Ui="#FFC800",Hl="#2F2A22";function qy({energyRatio:f,streakLit:s}){const d=Math.min(1,Math.max(0,f)),p=146-d*22;return c.jsxs("g",{children:[c.jsx("path",{d:"M82,120 h36 a6,6 0 0 1 6,6 v16 a8,8 0 0 1 -8,8 h-32 a8,8 0 0 1 -8,-8 v-16 a6,6 0 0 1 6,-6 Z",fill:_i,stroke:Hl,strokeWidth:"4.5"}),c.jsx("path",{d:"M86,124 h28 a4,4 0 0 1 4,4 v14 a5,5 0 0 1 -5,5 h-26 a5,5 0 0 1 -5,-5 v-14 a4,4 0 0 1 4,-4 Z",fill:Li}),c.jsxs("g",{children:[c.jsx("rect",{x:"82",y:p,width:"36",height:150-p,rx:"3",fill:s?"#4A4034":Es}),c.jsx("ellipse",{cx:"100",cy:p,rx:"18",ry:"2.6",fill:d>=.999?Ui:"#57503F"}),d>=.999&&c.jsx("path",{d:"M90,144 q5,-4 10,0 q5,4 10,0",fill:"none",stroke:Ui,strokeWidth:"2",strokeLinecap:"round",opacity:"0.8"})]}),c.jsx("path",{d:"M88,126.5 q12,-2.5 24,0",fill:"none",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",opacity:"0.6"}),c.jsx("rect",{x:"122",y:"121",width:"11",height:"11",rx:"2.5",fill:Kn,stroke:uh,strokeWidth:"1.8"}),c.jsx("path",{d:"M125.5,124.5 h4 M125.5,127.5 h4 M127.5,124 v6",stroke:Ti,strokeWidth:"1.5",strokeLinecap:"round"})]})}function Yy(f,s){switch(f){case"A":return c.jsx("path",{d:"M91,74 Q100,71.5 109,74 Q111,83 100,86.5 Q89,83 91,74 Z M96,76.5 Q100,78.5 104,76.5 Q103,81 100,82.5 Q97,81 96,76.5 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M90,76 Q100,73.8 110,76 Q110.8,82.2 100,83.4 Q89.2,82.2 90,76 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M90.5,78.4 Q100,77 109.5,78.4 Q110,81.8 100,82.4 Q90,81.8 90.5,78.4 Z",fill:s.ink});case"O":return c.jsx("path",{d:"M100,72.5 C105.5,72.5 108,77 108,80 C108,83.6 104.8,86.6 100,86.6 C95.2,86.6 92,83.6 92,80 C92,77 94.5,72.5 100,72.5 Z M100,77 C102.6,77 104.2,78.5 104.2,80.5 C104.2,82.5 102.5,83.7 100,83.7 C97.5,83.7 95.8,82.5 95.8,80.5 C95.8,78.5 97.4,77 100,77 Z",fill:s.ink,fillRule:"evenodd"});case"U":return c.jsx("path",{d:"M100,73 C103.2,73 105.2,76.6 105.2,80 C105.2,83.4 103.2,86 100,86 C96.8,86 94.8,83.4 94.8,80 C94.8,76.6 96.8,73 100,73 Z M100,76.8 C101.4,76.8 102.3,78.3 102.3,80.3 C102.3,82.3 101.4,83.5 100,83.5 C98.6,83.5 97.7,82.3 97.7,80.3 C97.7,78.3 98.6,76.8 100,76.8 Z",fill:s.ink,fillRule:"evenodd"});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M88,77.2 Q100,75.6 112,77.2 Q112.6,82.8 100,83.4 Q87.4,82.8 88,77.2 Z",fill:s.ink}),c.jsx("path",{d:"M91.5,77.8 L96.3,77.6 L95.7,81.6 L92.1,81.5 Z",fill:"#F7F2E6"}),c.jsx("path",{d:"M99,77.6 L104.3,77.6 L103.8,81.7 L99.3,81.6 Z",fill:"#F7F2E6",opacity:"0.9"}),c.jsx("path",{d:"M107,77.7 L110.3,77.9 L109.7,81.5 L107.3,81.4 Z",fill:"#F7F2E6",opacity:"0.72"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M91,74 Q100,71.5 109,74 Q111,83 100,86.5 Q89,83 91,74 Z M96,76.5 Q100,78.5 104,76.5 Q103,81 100,82.5 Q97,81 96,76.5 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96.2",y:"77.2",width:"7.6",height:"3",rx:"1.5",fill:s.pupil}),c.jsx("rect",{x:"98",y:"77.9",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M93.5,77 Q100,74.6 106.5,77 Q107,82.6 100,83.4 Q93,82.6 93.5,77 Z",fill:s.ink}),c.jsx("path",{d:"M94,76.6 Q100,74.8 106,76.6 L105.4,79.6 Q100,80.6 94.6,79.6 Z",fill:"#3A342A"}),c.jsx("rect",{x:"95.5",y:"80.6",width:"9",height:"2.5",rx:"1.25",fill:s.pupil})]});default:return c.jsx("path",{d:"M91,78.8 Q100,85.6 109,78.4",fill:"none",stroke:s.ink,strokeWidth:"4.2",strokeLinecap:"round"})}}function ky({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"5"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?Ui:Fa,opacity:"0.4"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?Ui:Fa})]}),c.jsx("path",{d:"M88,158 L112,158 L106,171 L94,171 Z",fill:Es,stroke:Hl,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10",fill:Li}),c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10",fill:Ti,transform:"translate(-4 -4)"})]}),c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10",fill:"none",stroke:Hl,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-body`,x:62,y:110,w:76,h:50,t:4,light:"rgba(255,255,255,0.5)",dark:"rgba(58,52,42,0.32)"}),c.jsx(qy,{energyRatio:x,streakLit:T})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("rect",{x:"38",y:"42",width:"5",height:"20",rx:"2.5",fill:Ti,stroke:Hl,strokeWidth:"3",transform:"rotate(14 40 52)"}),c.jsx("path",{d:"M41,56 Q43,62 40,66 Q37,62 39,56 Z",fill:T?Kn:Es,stroke:Hl,strokeWidth:"2.6",strokeLinejoin:"round",transform:"rotate(14 40 60)"}),T&&c.jsx("circle",{cx:"38",cy:"68",r:"3.4",fill:Kn,stroke:uh,strokeWidth:"2"})]}),c.jsx("rect",{x:"38",y:"58",width:"13",height:"26",rx:"3",fill:_i,stroke:Hl,strokeWidth:"4"}),c.jsx("path",{d:"M44.5,60 v22",stroke:Fa,strokeWidth:"2",strokeLinecap:"round"}),c.jsx("rect",{x:"149",y:"58",width:"13",height:"26",rx:"3",fill:_i,stroke:Hl,strokeWidth:"4"}),c.jsx("path",{d:"M155.5,60 v22",stroke:Fa,strokeWidth:"2",strokeLinecap:"round"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z",fill:Li}),c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z",fill:Ti,transform:"translate(-4 -4)"}),c.jsx("path",{d:"M100,30 L100,44",stroke:Hl,strokeWidth:"2.6"})]}),c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z",fill:"none",stroke:Hl,strokeWidth:"5",strokeLinejoin:"round"}),c.jsx(Ml,{id:`${f}-helm`,x:50,y:30,w:100,h:66,t:4,light:"rgba(255,255,255,0.46)",dark:"rgba(58,52,42,0.3)"}),c.jsx("path",{d:"M62,38 Q90,32 104,36 L98,44 Q74,42 62,46 Z",fill:Kn,opacity:"0.85"}),c.jsx("path",{d:"M112,36 L124,38 L118,45 L108,44 Z",fill:Kn,opacity:"0.45"}),c.jsx("rect",{x:"58",y:"48",width:"84",height:"46",rx:"8",fill:_i,stroke:Hl,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"5",fill:Qy}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:Fa,transform:"translate(0 15)"}),c.jsx("path",{d:"M70,56 v30 M78,56 v30 M122,56 v30 M130,56 v30",stroke:Fa,strokeWidth:"1.2",opacity:"0.7"}),c.jsx("path",{d:"M118,54 L136,54 L108,88 L92,88 Z",fill:"#FFFFFF",opacity:"0.22"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:xs,viseme:r,openScale:p,renderMouth:Yy}),c.jsx(eu,{flags:N,refs:s,p:xs})]})]}),N.proud&&c.jsx(au,{p:xs}),c.jsx(nu,{refs:s,armFill:Li,out:Hl})]})]})}const Gy={ember:Ty,frost:Ny,moss:Ry,astro:Fy,ink:ky};function Hm({form:f,expression:s,pose:d,viseme:r="closed",openScale:p=0,energyRatio:x=0,streakLit:T=!1,size:N=96,interactive:D=!1,ariaLabel:E,testid:Z,onPoke:U,onGrab:P,keySeq:jt=0,keyFlash:Et=!1,keySide:dt=1,screenKey:gt=null,coreLit:pt=!1,noteTick:Lt=!1,crownBadge:Ut=!1,haloBadge:Bt=!1}){const it="cp"+bl.useId().replace(/[^a-zA-Z0-9]/g,""),Y=Ey(),Mt=Ts(f),At={bot:bl.useRef(null),head:bl.useRef(null),armL:bl.useRef(null),armR:bl.useRef(null),eyes:bl.useRef(null),pupils:bl.useRef(null),waves:bl.useRef(null)},ce=At.bot;bl.useEffect(()=>{if(Y||jt<=0)return;const yt=dt===-1?At.armL.current:At.armR.current,_t=dt===-1?-44:44;yt==null||yt.animate([{transform:"rotate(0deg)"},{transform:`rotate(${_t}deg)`,offset:.38},{transform:"rotate(0deg)"}],{duration:185,easing:"cubic-bezier(0.2, 1.5, 0.4, 1)",composite:"add"});const xt=At.bot.current;xt&&(xt.style.transformBox="fill-box",xt.style.transformOrigin="50% 62%",xt.animate([{transform:"translateY(0px) scale(1, 1)"},{transform:"translateY(2.5px) scale(1.045, 0.93)",offset:.42},{transform:"translateY(0px) scale(1, 1)"}],{duration:185,easing:"ease-out",composite:"add"}))},[jt,dt,Y]);const el=s==="listening";bl.useEffect(()=>{if(!el||Y)return;let yt=0;const _t=()=>{const xt=vy(),M=At.waves.current;M&&(M.style.opacity=xt<=0?"0":"1",M.setAttribute("transform",`translate(174 72) scale(${(.55+.45*xt).toFixed(3)}) translate(-174 -72)`)),yt=requestAnimationFrame(_t)};return yt=requestAnimationFrame(_t),()=>cancelAnimationFrame(yt)},[el,Y]),bl.useEffect(()=>{if(Y)return;let yt=0,_t,xt={x:0,y:0},M={x:0,y:0},C=performance.now(),F=1,et=performance.now()+4200;const nt=()=>{const O=At.eyes.current;O&&(O.style.transform="scaleY(0.14)",setTimeout(()=>{O&&(O.style.transform="")},120)),_t=setTimeout(nt,2400+Math.random()*2600)};_t=setTimeout(nt,1500+Math.random()*1500);const m=O=>{const w=ce.current;if(!w)return;const Q=w.getBoundingClientRect();M=cy(O.clientX,O.clientY,Q.left+Q.width/2,Q.top+Q.height*.35,Math.max(140,Q.width)),C=performance.now()};window.addEventListener("pointermove",m,{passive:!0});const _=()=>{var Q;const O=performance.now();O-C>4e3&&O>=et&&(M=fy(F++),et=O+2200+F%3*450),xt={x:X1(xt.x,M.x,.1),y:X1(xt.y,M.y,.1)};const w=zs(xt.x,xt.y);(Q=At.pupils.current)==null||Q.setAttribute("transform",`translate(${(w.x*3).toFixed(2)} ${(w.y*2).toFixed(2)})`),yt=requestAnimationFrame(_)};return yt=requestAnimationFrame(_),()=>{clearTimeout(_t),cancelAnimationFrame(yt),window.removeEventListener("pointermove",m)}},[Y]);const Wt=Gy[Mt];return c.jsxs("svg",{viewBox:"0 0 200 200",className:`cp-mascot cp-form-${Mt} cp-pose-${d} cp-expr-${s}`,"data-testid":Z,"data-form":Mt,style:{width:N,height:N,transition:"width 0.9s cubic-bezier(0.3, 1.3, 0.4, 1), height 0.9s cubic-bezier(0.3, 1.3, 0.4, 1)",...D?{touchAction:"none",cursor:P?"grab":"pointer"}:{}},...D?{role:"button","aria-label":E,onClick:U,...P?{onPointerDown:yt=>{yt.button===0&&P(yt.clientX,yt.clientY)}}:{}}:{"aria-hidden":!0},children:[c.jsx("defs",{children:c.jsx("clipPath",{id:`${it}-keyclip`,children:c.jsx("circle",{cx:"100",cy:"135",r:"11.6"})})}),c.jsxs("g",{className:"cp-beacons","aria-hidden":"true",children:[c.jsx("circle",{cx:"52",cy:"86",r:"3",className:"cp-beacon-l"}),c.jsx("circle",{cx:"148",cy:"86",r:"3",className:"cp-beacon-r"})]}),c.jsxs("g",{className:"cp-thruster","aria-hidden":"true",children:[c.jsx("circle",{cx:"100",cy:"187",r:"5.2"}),c.jsx("circle",{cx:"91.5",cy:"198",r:"3.8"}),c.jsx("circle",{cx:"108.5",cy:"196.5",r:"3"})]}),Bt&&c.jsx("ellipse",{cx:"100",cy:"104",rx:"86",ry:"60",fill:"none",stroke:"#FFC800",strokeWidth:"2.5",opacity:"0.4",strokeDasharray:"10 7",className:"cp-halo"}),c.jsx(Wt,{uid:it,refs:At,expression:s,viseme:r,openScale:p,energyRatio:x,streakLit:T}),pt&&c.jsx("circle",{cx:"100",cy:"135",r:"21",fill:"none",stroke:"#FFC800",strokeWidth:"3",className:"cp-core-lit","aria-hidden":"true"}),gt&&c.jsxs("g",{"aria-hidden":"true",children:[c.jsx("g",{className:"cp-key-scope",clipPath:`url(#${it}-keyclip)`,children:K2(jt).map((yt,_t)=>c.jsx("rect",{x:86.8+_t*4.4,y:140-yt.h,width:"2.6",height:yt.h,rx:"1.1",className:"cp-scope-bar",style:{animationDelay:`${yt.d}ms`}},_t))}),c.jsx("text",{x:"100",y:"140",textAnchor:"middle",className:`cp-screen-key${Et?" cp-screen-key-flash":""}`,children:gt===" "?"␣":gt.toUpperCase()})]},`k${jt}`),el&&!gt&&c.jsxs("g",{className:"cp-screen-wave","aria-hidden":"true",children:[c.jsx("rect",{x:"88.6",y:"130",width:"3.2",height:"10",rx:"1.6"}),c.jsx("rect",{x:"93.6",y:"127",width:"3.2",height:"16",rx:"1.6"}),c.jsx("rect",{x:"98.6",y:"125",width:"3.2",height:"20",rx:"1.6"}),c.jsx("rect",{x:"103.6",y:"127",width:"3.2",height:"16",rx:"1.6"}),c.jsx("rect",{x:"108.6",y:"130",width:"3.2",height:"10",rx:"1.6"})]}),d==="writing"&&c.jsxs("g",{className:"cp-writing","aria-hidden":"true",children:[c.jsxs("g",{transform:"rotate(-8 100 150)",children:[c.jsx("path",{d:"M78,140 L99,145 L99,166 L78,161 Z",fill:"#F7F3E8",stroke:"#2B2530",strokeWidth:"3",strokeLinejoin:"round"}),c.jsx("path",{d:"M120,140 L99,145 L99,166 L120,161 Z",fill:"#EFE8D8",stroke:"#2B2530",strokeWidth:"3",strokeLinejoin:"round"}),c.jsx("path",{d:"M83,146 L95,149 M83,151 L95,154 M83,156 L95,159",stroke:"#9AA7B8",strokeWidth:"1.6",strokeLinecap:"round"}),c.jsx("path",{d:"M115,146 L103,149 M115,151 L103,154",stroke:"#9AA7B8",strokeWidth:"1.6",strokeLinecap:"round"})]}),Lt&&c.jsx("path",{className:"cp-note-tick",d:"M104,146 L108,152 L117,141",fill:"none",stroke:"#FFC800",strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-pen",transform:"rotate(24 100 128)",children:[c.jsx("rect",{x:"96",y:"106",width:"7",height:"26",rx:"2.5",fill:"#FFC568",stroke:"#2B2530",strokeWidth:"2.6"}),c.jsx("path",{d:"M96,132 L103,132 L99.5,141 Z",fill:"#F7F3E8",stroke:"#2B2530",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("path",{d:"M98.4,138.5 L100.6,138.5 L99.5,141 Z",fill:"#173047"}),c.jsx("rect",{x:"95",y:"101",width:"9",height:"6",rx:"2",fill:"#E8563F",stroke:"#2B2530",strokeWidth:"2.4"})]})]}),Ut&&c.jsx("g",{className:"cp-crown-badge","aria-hidden":"true",children:c.jsx("path",{d:"M84,26 L92,36 L100,24 L108,36 L116,26 L114,44 L86,44 Z",fill:"#FFC800",stroke:"#E8A400",strokeWidth:"2",strokeLinejoin:"round"})})]})}export{Em as $,gm as A,Iy as B,$y as C,om as D,rm as E,k1 as F,Dm as G,hm as H,Lm as I,xm as J,cm as K,lm as L,Hm as M,tm as N,Py as O,Nm as P,_m as Q,im as R,sm as S,em as T,nm as U,uy as V,am as W,Sm as X,fm as Y,Um as Z,wm as _,Z2 as a,my as a0,B2 as a1,Wy as a2,mm as a3,Tm as a4,Ky as a5,Vy as a6,I1 as b,ny as c,w2 as d,Xy as e,Ts as f,um as g,Om as h,ly as i,c as j,Jy as k,Rm as l,Cm as m,jm as n,Mm as o,Am as p,zm as q,bl as r,G1 as s,dm as t,Ey as u,iy as v,vm as w,bm as x,ym as y,pm as z};
|
|
53
|
+
L${(100+Math.cos(T)*N).toFixed(1)},${(135+Math.sin(T)*N).toFixed(1)} Z`};return c.jsxs("g",{children:[c.jsx("path",{d:"M100,117 L114,135 L100,153 L86,135 Z",fill:lh,stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),Array.from({length:6},(p,x)=>c.jsx("path",{d:r(x),fill:x<d?Xa:_y,stroke:ol,strokeWidth:"1.4",strokeLinejoin:"round",opacity:x<d?1:.55},x)),c.jsx("circle",{cx:"100",cy:"135",r:"3.2",fill:d>=6?Ya:Xa,stroke:ol,strokeWidth:"1.6"}),c.jsx("path",{d:"M94,124 L98,119",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",opacity:"0.8"}),c.jsx("rect",{x:"0",y:"0",width:"0",height:"0",fill:"none","data-uid":s})]})}function Oy(f,s){switch(f){case"A":return c.jsx("path",{d:"M92,74.5 L108,74.5 L113,78.5 L108,85.5 L92,85.5 L87,78.5 Z M95,77.5 L105,77.5 L105,83.5 L95,83.5 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M90,76.5 L110,76.5 L113,80 L110,83.5 L90,83.5 L87,80 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M90,79 L110,79 L111.5,80.8 L110,82.6 L90,82.6 L88.5,80.8 Z",fill:s.ink});case"O":return c.jsx("path",{d:"M100,73.5 L106,80.5 L100,86 L94,80.5 Z M100,77.5 L102.8,80.5 L100,83.4 L97.2,80.5 Z",fill:s.ink,fillRule:"evenodd"});case"U":return c.jsx("path",{d:"M100,74 L104,80.5 L100,85.5 L96,80.5 Z M100,78 L101.8,80.5 L100,83 L98.2,80.5 Z",fill:s.ink,fillRule:"evenodd"});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M86,76 L114,76 L112.5,82.6 L87.5,82.6 Z",fill:s.ink}),c.jsx("path",{d:"M90,76.4 L95.4,76.4 L94.4,82.2 L91.2,82.2 Z",fill:"#FFFFFF"}),c.jsx("path",{d:"M98,76.4 L103,76.4 L102.2,82.2 L99,82.2 Z",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("path",{d:"M105.6,76.4 L110.4,76.4 L109.4,82.2 L106.4,82.2 Z",fill:"#FFFFFF",opacity:"0.75"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74.5 L108,74.5 L113,78.5 L108,85.5 L92,85.5 L87,78.5 Z M95,77.5 L105,77.5 L105,83.5 L95,83.5 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96",y:"78",width:"8",height:"3.2",rx:"1.6",fill:s.pupil}),c.jsx("rect",{x:"98",y:"78.8",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74.5 L108,74.5 L112,78 L108,84.5 L92,84.5 L88,78 Z",fill:s.ink}),c.jsx("path",{d:"M93.5,76.2 L106.5,76.2 L105.8,79.4 L94.2,79.4 Z",fill:"#FFFFFF"}),c.jsx("rect",{x:"95.5",y:"80.6",width:"9",height:"2.6",rx:"1.3",fill:s.pupil})]});default:return c.jsx("path",{d:"M92,79.5 L100,83.5 L108,79.5",fill:"none",stroke:s.ink,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"})}}function Ny({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"6"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?Ya:Xa,opacity:"0.35"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?Ya:Xa})]}),c.jsx("path",{d:"M90,158 L110,158 L104,171 L96,171 Z",fill:"#2E3A4A",stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z",fill:rs}),c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z",fill:os,transform:"translate(-5 -5)"})]}),c.jsx("path",{d:"M70,110 L130,110 L142,122 L138,156 L62,156 L58,122 Z",fill:"none",stroke:ol,strokeWidth:"5",strokeLinejoin:"round"}),c.jsx(Ml,{id:`${f}-body`,x:58,y:110,w:84,h:46,t:4,light:"rgba(255,255,255,0.6)",dark:"rgba(24,58,82,0.4)"}),c.jsx(Dy,{energyRatio:x,uid:f}),c.jsx("circle",{cx:"74",cy:"150",r:"1.5",fill:ol,opacity:"0.45"}),c.jsx("circle",{cx:"126",cy:"150",r:"1.5",fill:ol,opacity:"0.45"})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("path",{d:"M40,58 L36,38 L44,50 Z",fill:T?Ya:Xa,stroke:ol,strokeWidth:"3.5",strokeLinejoin:"round"}),c.jsx("path",{d:"M46,56 L46,42 L52,52 Z",fill:T?Ya:os,stroke:ol,strokeWidth:"3",strokeLinejoin:"round"}),T&&c.jsx("path",{d:"M28,34 l3,-3 m-1,7 l3,-3 m-9,-1 l3,-3",stroke:Ya,strokeWidth:"2.2",strokeLinecap:"round"}),!T&&c.jsx("circle",{cx:"40",cy:"38",r:"8",fill:Xa,opacity:"0.22",className:"cp-ant-glow"})]}),c.jsx("path",{d:"M42,60 L42,84 L48,88 L54,84 L54,60 L48,56 Z",fill:hs,stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),c.jsx("path",{d:"M146,60 L146,84 L152,88 L158,84 L158,60 L152,56 Z",fill:hs,stroke:ol,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z",fill:rs}),c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z",fill:os,transform:"translate(-5 -5)"}),c.jsx("path",{d:"M60,34 L74,28 M132,28 L146,34",stroke:"#FFFFFF",strokeWidth:"2.4",strokeLinecap:"round",opacity:"0.75"})]}),c.jsx("path",{d:"M54,40 L76,26 L124,26 L146,40 L150,64 L142,96 L58,96 L50,64 Z",fill:"none",stroke:ol,strokeWidth:"5",strokeLinejoin:"round"}),c.jsx(Ml,{id:`${f}-helm`,x:50,y:26,w:100,h:70,t:4,light:"rgba(255,255,255,0.55)",dark:"rgba(24,58,82,0.38)"}),c.jsx("path",{d:"M58,36 L96,36 L90,45 L54,45 Z",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("path",{d:"M104,36 L118,36 L112,45 L102,45 Z",fill:"#FFFFFF",opacity:"0.5"}),c.jsx("path",{d:"M58,48 h84 a8,8 0 0 1 8,8 v30 a8,8 0 0 1 -8,8 h-84 a8,8 0 0 1 -8,-8 v-30 a8,8 0 0 1 8,-8 Z",fill:lh,stroke:ol,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"6",fill:Ly}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:hs,transform:"translate(0 15)"}),c.jsx("path",{d:"M118,54 L136,54 L108,88 L90,88 Z",fill:"#FFFFFF",opacity:"0.18"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:ss,viseme:r,openScale:p,renderMouth:Oy}),c.jsx(eu,{flags:N,refs:s,p:ss})]})]}),N.proud&&c.jsx(au,{p:ss}),c.jsx(nu,{refs:s,armFill:rs,out:ol})]})]})}const ds={out:"#2A3326",ink:"#2F5D3A",pupil:"#9BEFA9",wave:"#8FDBA0",crown:"#FFC800",crownD:"#D9A400"},ie="#9BEFA9",ys="#57BD74",Ms="#3E8E55",Uy="#F4FBE8",eh="#D7F0C8",ah="#3A4A34",ms="#FFC800",Jt="#2A3326";function Cy({energyRatio:f}){const s=Math.min(1,Math.max(0,f)),d=10+s*30,r=2+s*6;return c.jsxs("g",{children:[c.jsx("circle",{cx:"100",cy:"135",r:"16.5",fill:ah,stroke:Jt,strokeWidth:"4.5"}),c.jsx("circle",{cx:"100",cy:"135",r:"12.5",fill:eh}),c.jsx("path",{d:`M100,141 Q${100-s*2},${135-r} 100,${129-r}`,fill:"none",stroke:Ms,strokeWidth:"3",strokeLinecap:"round"}),c.jsx("g",{transform:`rotate(${-d} 100 133)`,children:c.jsx("path",{d:"M100,133 C95,127 87,127 85,131 C88,136 96,137 100,133 Z",fill:ie,stroke:Jt,strokeWidth:"2.6",strokeLinejoin:"round"})}),c.jsx("g",{transform:`rotate(${d} 100 133)`,children:c.jsx("path",{d:"M100,133 C105,127 113,127 115,131 C112,136 104,137 100,133 Z",fill:ie,stroke:Jt,strokeWidth:"2.6",strokeLinejoin:"round"})}),c.jsx("ellipse",{cx:"100",cy:"140",rx:"5.5",ry:"4",fill:"#7A5A3A",stroke:Jt,strokeWidth:"2.4"}),c.jsx("path",{d:"M95,130.5 Q97,128.5 99.5,129",stroke:"#FFFFFF",strokeWidth:"1.8",fill:"none",strokeLinecap:"round",opacity:"0.7"})]})}function wy(f,s){switch(f){case"A":return c.jsx("path",{d:"M92,74 Q100,71 108,74 Q110,83 100,86 Q90,83 92,74 Z M96,76 Q100,78 104,76 Q103,80 100,81.5 Q97,80 96,76 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M91,76.5 Q100,74 109,76.5 Q109,82 100,83 Q91,82 91,76.5 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M91,78.5 Q100,77 109,78.5 Q109,81.5 100,82.2 Q91,81.5 91,78.5 Z",fill:s.ink});case"O":return c.jsx("path",{d:"M100,72.5 C105,72.5 107.5,77 107.5,80 C107.5,83.5 104.5,86.5 100,86.5 C95.5,86.5 92.5,83.5 92.5,80 C92.5,77 95,72.5 100,72.5 Z M100,77 C102.5,77 104,78.5 104,80.5 C104,82.5 102.3,83.8 100,83.8 C97.7,83.8 96,82.5 96,80.5 C96,78.5 97.5,77 100,77 Z",fill:s.ink,fillRule:"evenodd"});case"U":return c.jsx("path",{d:"M100,73 C103,73 105,76.5 105,80 C105,83.3 103,86 100,86 C97,86 95,83.3 95,80 C95,76.5 97,73 100,73 Z M100,76.8 C101.3,76.8 102.2,78.3 102.2,80.3 C102.2,82.3 101.3,83.6 100,83.6 C98.7,83.6 97.8,82.3 97.8,80.3 C97.8,78.3 98.7,76.8 100,76.8 Z",fill:s.ink,fillRule:"evenodd"});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M87,77 Q100,75 113,77 Q113.5,82.5 100,83 Q86.5,82.5 87,77 Z",fill:s.ink}),c.jsx("rect",{x:"90.5",y:"77.8",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF"}),c.jsx("rect",{x:"96.5",y:"77.7",width:"1.8",height:"3.4",rx:"0.9",fill:"#FFFFFF",opacity:"0.92"}),c.jsx("rect",{x:"102.5",y:"77.8",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF",opacity:"0.84"}),c.jsx("rect",{x:"108",y:"77.9",width:"1.8",height:"3",rx:"0.9",fill:"#FFFFFF",opacity:"0.72"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74 Q100,71 108,74 Q110,83 100,86 Q90,83 92,74 Z M96,76 Q100,78 104,76 Q103,80 100,81.5 Q97,80 96,76 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96",y:"76.6",width:"8",height:"3.2",rx:"1.6",fill:s.pupil}),c.jsx("rect",{x:"98",y:"77.4",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M93.5,77 Q100,74.5 106.5,77 Q107,82.5 100,83.8 Q93,82.5 93.5,77 Z",fill:s.ink}),c.jsx("rect",{x:"94.5",y:"77.2",width:"11",height:"2.4",rx:"1.2",fill:"#FFFFFF"}),c.jsx("rect",{x:"95.5",y:"80.4",width:"9",height:"2.6",rx:"1.3",fill:s.pupil})]});default:return c.jsx("path",{d:"M92,79.5 Q100,85.5 108,79.5",fill:"none",stroke:s.ink,strokeWidth:"3.5",strokeLinecap:"round"})}}function Ry({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"12"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?ms:ie,opacity:"0.3"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?ms:ie})]}),c.jsx("path",{d:"M88,158 Q100,152 112,158 L106,171 Q100,174 94,171 Z",fill:"#3A4A34",stroke:Jt,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22",fill:ys}),c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22",fill:ie,transform:"translate(-4 -4)"})]}),c.jsx("rect",{x:"64",y:"110",width:"72",height:"50",rx:"22",fill:"none",stroke:Jt,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-body`,x:64,y:110,w:72,h:50,t:4,light:"rgba(255,255,255,0.42)",dark:"rgba(38,74,46,0.4)"}),c.jsx(Cy,{energyRatio:x}),c.jsx("circle",{cx:"73",cy:"150",r:"1.6",fill:Jt,opacity:"0.45"}),c.jsx("circle",{cx:"127",cy:"150",r:"1.6",fill:Jt,opacity:"0.45"})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("path",{d:"M43,60 Q40,50 44,42",fill:"none",stroke:Jt,strokeWidth:"4",strokeLinecap:"round"}),T?c.jsxs("g",{children:[Array.from({length:5},(D,E)=>c.jsx("ellipse",{cx:"44",cy:"33",rx:"4",ry:"7.5",fill:ms,stroke:Jt,strokeWidth:"2",transform:`rotate(${E*72} 44 40)`},E)),c.jsx("circle",{cx:"44",cy:"40",r:"4.5",fill:"#FFF3C4",stroke:Jt,strokeWidth:"2"})]}):c.jsxs("g",{children:[c.jsx("ellipse",{cx:"44",cy:"39",rx:"5.5",ry:"7",fill:ie,stroke:Jt,strokeWidth:"3"}),c.jsx("path",{d:"M44,33 Q46.5,39 44,45",fill:"none",stroke:Ms,strokeWidth:"1.8"})]})]}),c.jsx("path",{d:"M48,62 C36,56 30,62 32,70 C38,76 48,74 48,62 Z",fill:ie,stroke:Jt,strokeWidth:"4",strokeLinejoin:"round"}),c.jsx("path",{d:"M152,62 C164,56 170,62 168,70 C162,76 152,74 152,62 Z",fill:ie,stroke:Jt,strokeWidth:"4",strokeLinejoin:"round"}),c.jsx("path",{d:"M36,62 Q42,66 46,68 M164,62 Q158,66 154,68",stroke:Ms,strokeWidth:"1.8",fill:"none",strokeLinecap:"round"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42",fill:ys}),c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42",fill:ie,transform:"translate(-5 -5)"})]}),c.jsx("ellipse",{cx:"100",cy:"69",rx:"56",ry:"42",fill:"none",stroke:Jt,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-helm`,x:44,y:27,w:112,h:84,t:4,light:"rgba(255,255,255,0.36)",dark:"rgba(38,74,46,0.36)"}),c.jsx("path",{d:"M58,37 Q86,31 104,38 L96,47 Q68,46 58,37 Z",fill:"#FFFFFF",opacity:"0.88"}),c.jsx("circle",{cx:"118",cy:"41",r:"4",fill:"#FFFFFF",opacity:"0.55"}),c.jsx("rect",{x:"58",y:"48",width:"84",height:"46",rx:"16",fill:ah,stroke:Jt,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"12",fill:Uy}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:eh,transform:"translate(0 15)"}),c.jsx("path",{d:"M120,54 L136,54 L106,88 L90,88 Z",fill:"#FFFFFF",opacity:"0.2"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:ds,viseme:r,openScale:p,renderMouth:wy}),c.jsx(eu,{flags:N,refs:s,p:ds})]})]}),N.proud&&c.jsx(au,{p:ds}),c.jsx(nu,{refs:s,armFill:ys,out:Jt})]})]})}const gs={out:"#221C38",ink:"#FFEFC2",pupil:"#8B7BF0",wave:"#B7ACFF",crown:"#FFD75E",crownD:"#D9A400"},Za="#8B7BF0",ps="#5D4FD1",Hy="#241E4E",nh="#3A2F6E",ka="#1A1440",Vn="#FFEFC2",Ba="#FFD75E",jl="#221C38";function Zy({energyRatio:f,uid:s}){const d=Math.min(1,Math.max(0,f)),r=(1-d)*26;return c.jsxs("g",{children:[c.jsx("circle",{cx:"100",cy:"135",r:"16.5",fill:ka,stroke:jl,strokeWidth:"4.5"}),c.jsx("circle",{cx:"100",cy:"135",r:"12.5",fill:nh}),c.jsxs("g",{clipPath:`url(#${s}-moon)`,children:[c.jsx("circle",{cx:"100",cy:"135",r:"11.5",fill:Vn}),c.jsx("circle",{cx:100-r,cy:"135",r:"12.5",fill:ka})]}),c.jsx("circle",{cx:"100",cy:"135",r:"12.5",fill:"none",stroke:jl,strokeWidth:"2"}),c.jsxs("g",{opacity:.35*d,children:[c.jsx("circle",{cx:"96",cy:"131",r:"2",fill:ka}),c.jsx("circle",{cx:"104",cy:"138",r:"1.5",fill:ka}),c.jsx("circle",{cx:"99",cy:"140",r:"1.1",fill:ka})]})]})}function By(f,s){switch(f){case"A":return c.jsx("path",{d:"M91,74.5 h18 a5,5 0 0 1 5,5 v2.6 a5,5 0 0 1 -5,5 h-18 a5,5 0 0 1 -5,-5 v-2.6 a5,5 0 0 1 5,-5 Z M95,77.5 h10 v5.6 h-10 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M90,77 h20 a3.2,3.2 0 0 1 0,6.4 h-20 a3.2,3.2 0 0 1 0,-6.4 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M90,79.5 h20 a1.9,1.9 0 0 1 0,3.8 h-20 a1.9,1.9 0 0 1 0,-3.8 Z",fill:s.ink});case"O":return c.jsxs("g",{fill:"none",children:[c.jsx("circle",{cx:"100",cy:"79.5",r:"6.4",stroke:s.ink,strokeWidth:"4"}),c.jsx("circle",{cx:"100",cy:"79.5",r:"1.6",fill:s.ink,stroke:"none"})]});case"U":return c.jsx("g",{fill:"none",children:c.jsx("circle",{cx:"100",cy:"79.5",r:"4.4",stroke:s.ink,strokeWidth:"3.6"})});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M87,76.5 h26 a2.4,2.4 0 0 1 2.4,2.4 v1.2 a2.4,2.4 0 0 1 -2.4,2.4 h-26 a2.4,2.4 0 0 1 -2.4,-2.4 v-1.2 a2.4,2.4 0 0 1 2.4,-2.4 Z",fill:s.ink}),c.jsx("rect",{x:"90.5",y:"78.1",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF"}),c.jsx("rect",{x:"96.5",y:"78.1",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF",opacity:"0.92"}),c.jsx("rect",{x:"102.5",y:"78.1",width:"1.8",height:"3.2",rx:"0.9",fill:"#FFFFFF",opacity:"0.84"}),c.jsx("rect",{x:"108",y:"78.1",width:"1.8",height:"3",rx:"0.9",fill:"#FFFFFF",opacity:"0.72"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M91,74.5 h18 a5,5 0 0 1 5,5 v2.6 a5,5 0 0 1 -5,5 h-18 a5,5 0 0 1 -5,-5 v-2.6 a5,5 0 0 1 5,-5 Z M95,77.5 h10 v5.6 h-10 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96",y:"77.2",width:"8",height:"3.2",rx:"1.6",fill:s.pupil}),c.jsx("rect",{x:"98",y:"78",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M92,74.8 h16 a5,5 0 0 1 5,5 v2.4 a5,5 0 0 1 -5,5 h-16 a5,5 0 0 1 -5,-5 v-2.4 a5,5 0 0 1 5,-5 Z",fill:s.ink}),c.jsx("rect",{x:"93.5",y:"76.6",width:"13",height:"2.4",rx:"1.2",fill:"#FFFFFF"}),c.jsx("rect",{x:"95.5",y:"79.6",width:"9",height:"2.6",rx:"1.3",fill:s.pupil})]});default:return c.jsx("path",{d:"M92,79.5 Q100,85 108,79.5",fill:"none",stroke:s.ink,strokeWidth:"3.5",strokeLinecap:"round"})}}function Fy({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"9"})}),c.jsx("clipPath",{id:`${f}-moon`,children:c.jsx("circle",{cx:"100",cy:"135",r:"12.5"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?Ba:Za,opacity:"0.38"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?Ba:Za})]}),c.jsx("path",{d:"M88,158 L112,158 L106,171 L94,171 Z",fill:"#2A2248",stroke:jl,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20",fill:ps}),c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20",fill:Za,transform:"translate(-4 -4)"})]}),c.jsx("rect",{x:"66",y:"110",width:"68",height:"50",rx:"20",fill:"none",stroke:jl,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-body`,x:66,y:110,w:68,h:50,t:4,light:"rgba(196,181,255,0.34)",dark:"rgba(10,6,32,0.5)"}),c.jsx(Zy,{energyRatio:x,uid:f}),c.jsx("circle",{cx:"76",cy:"150",r:"1.5",fill:jl,opacity:"0.5"}),c.jsx("circle",{cx:"124",cy:"150",r:"1.5",fill:jl,opacity:"0.5"})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("ellipse",{cx:"42",cy:"44",rx:"13",ry:"5.5",fill:"none",stroke:jl,strokeWidth:"3.5",transform:"rotate(-24 42 44)"}),c.jsx("circle",{cx:"49",cy:"39",r:"5",fill:T?Ba:Vn,stroke:jl,strokeWidth:"3"}),T&&c.jsx("path",{d:"M56,34 L68,26 M57,41 L71,38 M52,30 L58,20",stroke:Ba,strokeWidth:"2.4",strokeLinecap:"round"})]}),c.jsx("circle",{cx:"44",cy:"72",r:"8",fill:Za,stroke:jl,strokeWidth:"4"}),c.jsx("ellipse",{cx:"44",cy:"72",rx:"13",ry:"4.5",fill:"none",stroke:Ba,strokeWidth:"2.4",transform:"rotate(-18 44 72)"}),c.jsx("circle",{cx:"156",cy:"72",r:"8",fill:Za,stroke:jl,strokeWidth:"4"}),c.jsx("ellipse",{cx:"156",cy:"72",rx:"13",ry:"4.5",fill:"none",stroke:Ba,strokeWidth:"2.4",transform:"rotate(18 156 72)"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z",fill:ps}),c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z",fill:Za,transform:"translate(-5 -5)"}),c.jsx("circle",{cx:"66",cy:"42",r:"1.6",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("circle",{cx:"82",cy:"33",r:"1.2",fill:"#FFFFFF",opacity:"0.75"}),c.jsx("circle",{cx:"130",cy:"36",r:"1.7",fill:"#FFFFFF",opacity:"0.9"}),c.jsx("circle",{cx:"118",cy:"30",r:"1",fill:"#FFFFFF",opacity:"0.6"}),c.jsx("path",{d:"M94,28 l1.6,3.2 3.4,0.5 -2.5,2.4 0.6,3.4 -3.1,-1.7 -3.1,1.7 0.6,-3.4 -2.5,-2.4 3.4,-0.5 Z",fill:"#FFFFFF",opacity:"0.85"})]}),c.jsx("path",{d:"M48,96 L48,62 Q48,26 100,26 Q152,26 152,62 L152,96 Z",fill:"none",stroke:jl,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-helm`,x:48,y:26,w:104,h:70,t:4,light:"rgba(196,181,255,0.3)",dark:"rgba(10,6,32,0.45)"}),c.jsx("path",{d:"M56,40 Q88,28 110,34 L102,44 Q72,40 56,46 Z",fill:"#FFFFFF",opacity:"0.8"}),c.jsx("rect",{x:"58",y:"48",width:"84",height:"46",rx:"12",fill:ka,stroke:jl,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"9",fill:Hy}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:nh,transform:"translate(0 15)"}),c.jsx("circle",{cx:"74",cy:"60",r:"1",fill:Vn,opacity:"0.8"}),c.jsx("circle",{cx:"128",cy:"82",r:"1.2",fill:Vn,opacity:"0.6"}),c.jsx("circle",{cx:"86",cy:"84",r:"0.8",fill:Vn,opacity:"0.5"}),c.jsx("path",{d:"M118,54 L136,54 L106,88 L92,88 Z",fill:"#FFFFFF",opacity:"0.08"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:gs,viseme:r,openScale:p,renderMouth:By}),c.jsx(eu,{flags:N,refs:s,p:gs})]})]}),N.proud&&c.jsx(au,{p:gs}),c.jsx(nu,{refs:s,armFill:ps,out:jl})]})]})}const xs={out:"#2F2A22",ink:"#2B2B2B",pupil:"#F7F2E6",wave:"#8FB8C9",crown:"#FFC800",crownD:"#D9A400"},Ti="#F7F2E6",Li="#DCD2B8",Qy="#FBF7EC",Fa="#EFE7D2",_i="#4A4234",Kn="#E8543F",uh="#B8392A",Es="#3A342A",Ui="#FFC800",Hl="#2F2A22";function qy({energyRatio:f,streakLit:s}){const d=Math.min(1,Math.max(0,f)),p=146-d*22;return c.jsxs("g",{children:[c.jsx("path",{d:"M82,120 h36 a6,6 0 0 1 6,6 v16 a8,8 0 0 1 -8,8 h-32 a8,8 0 0 1 -8,-8 v-16 a6,6 0 0 1 6,-6 Z",fill:_i,stroke:Hl,strokeWidth:"4.5"}),c.jsx("path",{d:"M86,124 h28 a4,4 0 0 1 4,4 v14 a5,5 0 0 1 -5,5 h-26 a5,5 0 0 1 -5,-5 v-14 a4,4 0 0 1 4,-4 Z",fill:Li}),c.jsxs("g",{children:[c.jsx("rect",{x:"82",y:p,width:"36",height:150-p,rx:"3",fill:s?"#4A4034":Es}),c.jsx("ellipse",{cx:"100",cy:p,rx:"18",ry:"2.6",fill:d>=.999?Ui:"#57503F"}),d>=.999&&c.jsx("path",{d:"M90,144 q5,-4 10,0 q5,4 10,0",fill:"none",stroke:Ui,strokeWidth:"2",strokeLinecap:"round",opacity:"0.8"})]}),c.jsx("path",{d:"M88,126.5 q12,-2.5 24,0",fill:"none",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",opacity:"0.6"}),c.jsx("rect",{x:"122",y:"121",width:"11",height:"11",rx:"2.5",fill:Kn,stroke:uh,strokeWidth:"1.8"}),c.jsx("path",{d:"M125.5,124.5 h4 M125.5,127.5 h4 M127.5,124 v6",stroke:Ti,strokeWidth:"1.5",strokeLinecap:"round"})]})}function Yy(f,s){switch(f){case"A":return c.jsx("path",{d:"M91,74 Q100,71.5 109,74 Q111,83 100,86.5 Q89,83 91,74 Z M96,76.5 Q100,78.5 104,76.5 Q103,81 100,82.5 Q97,81 96,76.5 Z",fill:s.ink,fillRule:"evenodd"});case"E":return c.jsx("path",{d:"M90,76 Q100,73.8 110,76 Q110.8,82.2 100,83.4 Q89.2,82.2 90,76 Z",fill:s.ink});case"I":return c.jsx("path",{d:"M90.5,78.4 Q100,77 109.5,78.4 Q110,81.8 100,82.4 Q90,81.8 90.5,78.4 Z",fill:s.ink});case"O":return c.jsx("path",{d:"M100,72.5 C105.5,72.5 108,77 108,80 C108,83.6 104.8,86.6 100,86.6 C95.2,86.6 92,83.6 92,80 C92,77 94.5,72.5 100,72.5 Z M100,77 C102.6,77 104.2,78.5 104.2,80.5 C104.2,82.5 102.5,83.7 100,83.7 C97.5,83.7 95.8,82.5 95.8,80.5 C95.8,78.5 97.4,77 100,77 Z",fill:s.ink,fillRule:"evenodd"});case"U":return c.jsx("path",{d:"M100,73 C103.2,73 105.2,76.6 105.2,80 C105.2,83.4 103.2,86 100,86 C96.8,86 94.8,83.4 94.8,80 C94.8,76.6 96.8,73 100,73 Z M100,76.8 C101.4,76.8 102.3,78.3 102.3,80.3 C102.3,82.3 101.4,83.5 100,83.5 C98.6,83.5 97.7,82.3 97.7,80.3 C97.7,78.3 98.6,76.8 100,76.8 Z",fill:s.ink,fillRule:"evenodd"});case"SS":return c.jsxs("g",{children:[c.jsx("path",{d:"M88,77.2 Q100,75.6 112,77.2 Q112.6,82.8 100,83.4 Q87.4,82.8 88,77.2 Z",fill:s.ink}),c.jsx("path",{d:"M91.5,77.8 L96.3,77.6 L95.7,81.6 L92.1,81.5 Z",fill:"#F7F2E6"}),c.jsx("path",{d:"M99,77.6 L104.3,77.6 L103.8,81.7 L99.3,81.6 Z",fill:"#F7F2E6",opacity:"0.9"}),c.jsx("path",{d:"M107,77.7 L110.3,77.9 L109.7,81.5 L107.3,81.4 Z",fill:"#F7F2E6",opacity:"0.72"})]});case"L":return c.jsxs("g",{children:[c.jsx("path",{d:"M91,74 Q100,71.5 109,74 Q111,83 100,86.5 Q89,83 91,74 Z M96,76.5 Q100,78.5 104,76.5 Q103,81 100,82.5 Q97,81 96,76.5 Z",fill:s.ink,fillRule:"evenodd"}),c.jsx("rect",{x:"96.2",y:"77.2",width:"7.6",height:"3",rx:"1.5",fill:s.pupil}),c.jsx("rect",{x:"98",y:"77.9",width:"4",height:"1.6",rx:"0.8",fill:"#FFFFFF",opacity:"0.9"})]});case"FV":return c.jsxs("g",{children:[c.jsx("path",{d:"M93.5,77 Q100,74.6 106.5,77 Q107,82.6 100,83.4 Q93,82.6 93.5,77 Z",fill:s.ink}),c.jsx("path",{d:"M94,76.6 Q100,74.8 106,76.6 L105.4,79.6 Q100,80.6 94.6,79.6 Z",fill:"#3A342A"}),c.jsx("rect",{x:"95.5",y:"80.6",width:"9",height:"2.5",rx:"1.25",fill:s.pupil})]});default:return c.jsx("path",{d:"M91,78.8 Q100,85.6 109,78.4",fill:"none",stroke:s.ink,strokeWidth:"4.2",strokeLinecap:"round"})}}function ky({uid:f,refs:s,expression:d,viseme:r,openScale:p,energyRatio:x,streakLit:T}){const N=tu(d);return c.jsxs(c.Fragment,{children:[c.jsxs("defs",{children:[c.jsx("clipPath",{id:`${f}-body`,children:c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10"})}),c.jsx("clipPath",{id:`${f}-helm`,children:c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z"})}),c.jsx("clipPath",{id:`${f}-scr`,children:c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"5"})})]}),c.jsxs("g",{ref:s.bot,className:"cp-bot",children:[c.jsxs("g",{className:"cp-thrust",children:[c.jsx("ellipse",{cx:"100",cy:"177",rx:"11",ry:"8",fill:T?Ui:Fa,opacity:"0.4"}),c.jsx("ellipse",{cx:"100",cy:"176",rx:"7",ry:"5",fill:T?Ui:Fa})]}),c.jsx("path",{d:"M88,158 L112,158 L106,171 L94,171 Z",fill:Es,stroke:Hl,strokeWidth:"4",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-body",children:[c.jsxs("g",{clipPath:`url(#${f}-body)`,children:[c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10",fill:Li}),c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10",fill:Ti,transform:"translate(-4 -4)"})]}),c.jsx("rect",{x:"62",y:"110",width:"76",height:"50",rx:"10",fill:"none",stroke:Hl,strokeWidth:"5"}),c.jsx(Ml,{id:`${f}-body`,x:62,y:110,w:76,h:50,t:4,light:"rgba(255,255,255,0.5)",dark:"rgba(58,52,42,0.32)"}),c.jsx(qy,{energyRatio:x,streakLit:T})]}),c.jsxs("g",{ref:s.head,className:"cp-head",children:[c.jsxs("g",{className:"cp-antenna",children:[c.jsx("rect",{x:"38",y:"42",width:"5",height:"20",rx:"2.5",fill:Ti,stroke:Hl,strokeWidth:"3",transform:"rotate(14 40 52)"}),c.jsx("path",{d:"M41,56 Q43,62 40,66 Q37,62 39,56 Z",fill:T?Kn:Es,stroke:Hl,strokeWidth:"2.6",strokeLinejoin:"round",transform:"rotate(14 40 60)"}),T&&c.jsx("circle",{cx:"38",cy:"68",r:"3.4",fill:Kn,stroke:uh,strokeWidth:"2"})]}),c.jsx("rect",{x:"38",y:"58",width:"13",height:"26",rx:"3",fill:_i,stroke:Hl,strokeWidth:"4"}),c.jsx("path",{d:"M44.5,60 v22",stroke:Fa,strokeWidth:"2",strokeLinecap:"round"}),c.jsx("rect",{x:"149",y:"58",width:"13",height:"26",rx:"3",fill:_i,stroke:Hl,strokeWidth:"4"}),c.jsx("path",{d:"M155.5,60 v22",stroke:Fa,strokeWidth:"2",strokeLinecap:"round"}),c.jsxs("g",{clipPath:`url(#${f}-helm)`,children:[c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z",fill:Li}),c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z",fill:Ti,transform:"translate(-4 -4)"}),c.jsx("path",{d:"M100,30 L100,44",stroke:Hl,strokeWidth:"2.6"})]}),c.jsx("path",{d:"M54,44 L100,30 L146,44 L150,72 L142,96 L58,96 L50,72 Z",fill:"none",stroke:Hl,strokeWidth:"5",strokeLinejoin:"round"}),c.jsx(Ml,{id:`${f}-helm`,x:50,y:30,w:100,h:66,t:4,light:"rgba(255,255,255,0.46)",dark:"rgba(58,52,42,0.3)"}),c.jsx("path",{d:"M62,38 Q90,32 104,36 L98,44 Q74,42 62,46 Z",fill:Kn,opacity:"0.85"}),c.jsx("path",{d:"M112,36 L124,38 L118,45 L108,44 Z",fill:Kn,opacity:"0.45"}),c.jsx("rect",{x:"58",y:"48",width:"84",height:"46",rx:"8",fill:_i,stroke:Hl,strokeWidth:"4.5"}),c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",rx:"5",fill:Qy}),c.jsxs("g",{clipPath:`url(#${f}-scr)`,children:[c.jsx("rect",{x:"64",y:"54",width:"72",height:"34",fill:Fa,transform:"translate(0 15)"}),c.jsx("path",{d:"M70,56 v30 M78,56 v30 M122,56 v30 M130,56 v30",stroke:Fa,strokeWidth:"1.2",opacity:"0.7"}),c.jsx("path",{d:"M118,54 L136,54 L108,88 L92,88 Z",fill:"#FFFFFF",opacity:"0.22"})]}),c.jsxs("g",{className:"cp-scr-face",clipPath:`url(#${f}-scr)`,children:[c.jsx(lu,{expression:d,flags:N,refs:s,p:xs,viseme:r,openScale:p,renderMouth:Yy}),c.jsx(eu,{flags:N,refs:s,p:xs})]})]}),N.proud&&c.jsx(au,{p:xs}),c.jsx(nu,{refs:s,armFill:Li,out:Hl})]})]})}const Gy={ember:Ty,frost:Ny,moss:Ry,astro:Fy,ink:ky};function Hm({form:f,expression:s,pose:d,viseme:r="closed",openScale:p=0,energyRatio:x=0,streakLit:T=!1,size:N=96,interactive:D=!1,ariaLabel:E,testid:Z,onPoke:U,onGrab:P,keySeq:jt=0,keyFlash:Et=!1,keySide:dt=1,screenKey:gt=null,coreLit:pt=!1,noteTick:Lt=!1,crownBadge:Ut=!1,haloBadge:Bt=!1}){const it="cp"+bl.useId().replace(/[^a-zA-Z0-9]/g,""),Y=Ey(),Mt=Ts(f),At={bot:bl.useRef(null),head:bl.useRef(null),armL:bl.useRef(null),armR:bl.useRef(null),eyes:bl.useRef(null),pupils:bl.useRef(null),waves:bl.useRef(null)},ce=At.bot;bl.useEffect(()=>{if(Y||jt<=0)return;const yt=dt===-1?At.armL.current:At.armR.current,_t=dt===-1?-44:44;yt==null||yt.animate([{transform:"rotate(0deg)"},{transform:`rotate(${_t}deg)`,offset:.38},{transform:"rotate(0deg)"}],{duration:185,easing:"cubic-bezier(0.2, 1.5, 0.4, 1)",composite:"add"});const xt=At.bot.current;xt&&(xt.style.transformBox="fill-box",xt.style.transformOrigin="50% 62%",xt.animate([{transform:"translateY(0px) scale(1, 1)"},{transform:"translateY(2.5px) scale(1.045, 0.93)",offset:.42},{transform:"translateY(0px) scale(1, 1)"}],{duration:185,easing:"ease-out",composite:"add"}))},[jt,dt,Y]);const el=s==="listening";bl.useEffect(()=>{if(!el||Y)return;let yt=0;const _t=()=>{const xt=vy(),M=At.waves.current;M&&(M.style.opacity=xt<=0?"0":"1",M.setAttribute("transform",`translate(174 72) scale(${(.55+.45*xt).toFixed(3)}) translate(-174 -72)`)),yt=requestAnimationFrame(_t)};return yt=requestAnimationFrame(_t),()=>cancelAnimationFrame(yt)},[el,Y]),bl.useEffect(()=>{if(Y)return;let yt=0,_t,xt={x:0,y:0},M={x:0,y:0},C=performance.now(),F=1,et=performance.now()+4200;const nt=()=>{const O=At.eyes.current;O&&(O.style.transform="scaleY(0.14)",setTimeout(()=>{O&&(O.style.transform="")},120)),_t=setTimeout(nt,2400+Math.random()*2600)};_t=setTimeout(nt,1500+Math.random()*1500);const m=O=>{const w=ce.current;if(!w)return;const Q=w.getBoundingClientRect();M=cy(O.clientX,O.clientY,Q.left+Q.width/2,Q.top+Q.height*.35,Math.max(140,Q.width)),C=performance.now()};window.addEventListener("pointermove",m,{passive:!0});const _=()=>{var Q;const O=performance.now();O-C>4e3&&O>=et&&(M=fy(F++),et=O+2200+F%3*450),xt={x:X1(xt.x,M.x,.1),y:X1(xt.y,M.y,.1)};const w=zs(xt.x,xt.y);(Q=At.pupils.current)==null||Q.setAttribute("transform",`translate(${(w.x*3).toFixed(2)} ${(w.y*2).toFixed(2)})`),yt=requestAnimationFrame(_)};return yt=requestAnimationFrame(_),()=>{clearTimeout(_t),cancelAnimationFrame(yt),window.removeEventListener("pointermove",m)}},[Y]);const Wt=Gy[Mt];return c.jsxs("svg",{viewBox:"0 0 200 200",className:`cp-mascot cp-form-${Mt} cp-pose-${d} cp-expr-${s}`,"data-testid":Z,"data-form":Mt,style:{width:N,height:N,transition:"width 0.9s cubic-bezier(0.3, 1.3, 0.4, 1), height 0.9s cubic-bezier(0.3, 1.3, 0.4, 1)",...D?{touchAction:"none",cursor:P?"grab":"pointer"}:{}},...D?{role:"button","aria-label":E,onClick:U,...P?{onPointerDown:yt=>{yt.button===0&&P(yt.clientX,yt.clientY)}}:{}}:{"aria-hidden":!0},children:[c.jsx("defs",{children:c.jsx("clipPath",{id:`${it}-keyclip`,children:c.jsx("circle",{cx:"100",cy:"135",r:"11.6"})})}),c.jsxs("g",{className:"cp-beacons","aria-hidden":"true",children:[c.jsx("circle",{cx:"52",cy:"86",r:"3",className:"cp-beacon-l"}),c.jsx("circle",{cx:"148",cy:"86",r:"3",className:"cp-beacon-r"})]}),c.jsxs("g",{className:"cp-thruster","aria-hidden":"true",children:[c.jsx("circle",{cx:"100",cy:"187",r:"5.2"}),c.jsx("circle",{cx:"91.5",cy:"198",r:"3.8"}),c.jsx("circle",{cx:"108.5",cy:"196.5",r:"3"})]}),Bt&&c.jsx("ellipse",{cx:"100",cy:"104",rx:"86",ry:"60",fill:"none",stroke:"#FFC800",strokeWidth:"2.5",opacity:"0.4",strokeDasharray:"10 7",className:"cp-halo"}),c.jsx(Wt,{uid:it,refs:At,expression:s,viseme:r,openScale:p,energyRatio:x,streakLit:T}),pt&&c.jsx("circle",{cx:"100",cy:"135",r:"21",fill:"none",stroke:"#FFC800",strokeWidth:"3",className:"cp-core-lit","aria-hidden":"true"}),gt&&c.jsxs("g",{"aria-hidden":"true",children:[c.jsx("g",{className:"cp-key-scope",clipPath:`url(#${it}-keyclip)`,children:K2(jt).map((yt,_t)=>c.jsx("rect",{x:86.8+_t*4.4,y:140-yt.h,width:"2.6",height:yt.h,rx:"1.1",className:"cp-scope-bar",style:{animationDelay:`${yt.d}ms`}},_t))}),c.jsx("text",{x:"100",y:"140",textAnchor:"middle",className:`cp-screen-key${Et?" cp-screen-key-flash":""}`,children:gt===" "?"␣":gt.toUpperCase()})]},`k${jt}`),el&&!gt&&c.jsxs("g",{className:"cp-screen-wave","aria-hidden":"true",children:[c.jsx("rect",{x:"88.6",y:"130",width:"3.2",height:"10",rx:"1.6"}),c.jsx("rect",{x:"93.6",y:"127",width:"3.2",height:"16",rx:"1.6"}),c.jsx("rect",{x:"98.6",y:"125",width:"3.2",height:"20",rx:"1.6"}),c.jsx("rect",{x:"103.6",y:"127",width:"3.2",height:"16",rx:"1.6"}),c.jsx("rect",{x:"108.6",y:"130",width:"3.2",height:"10",rx:"1.6"})]}),d==="writing"&&c.jsxs("g",{className:"cp-writing","aria-hidden":"true",children:[c.jsxs("g",{transform:"rotate(-8 100 150)",children:[c.jsx("path",{d:"M78,140 L99,145 L99,166 L78,161 Z",fill:"#F7F3E8",stroke:"#2B2530",strokeWidth:"3",strokeLinejoin:"round"}),c.jsx("path",{d:"M120,140 L99,145 L99,166 L120,161 Z",fill:"#EFE8D8",stroke:"#2B2530",strokeWidth:"3",strokeLinejoin:"round"}),c.jsx("path",{d:"M83,146 L95,149 M83,151 L95,154 M83,156 L95,159",stroke:"#9AA7B8",strokeWidth:"1.6",strokeLinecap:"round"}),c.jsx("path",{d:"M115,146 L103,149 M115,151 L103,154",stroke:"#9AA7B8",strokeWidth:"1.6",strokeLinecap:"round"})]}),Lt&&c.jsx("path",{className:"cp-note-tick",d:"M104,146 L108,152 L117,141",fill:"none",stroke:"#FFC800",strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsxs("g",{className:"cp-pen",transform:"rotate(24 100 128)",children:[c.jsx("rect",{x:"96",y:"106",width:"7",height:"26",rx:"2.5",fill:"#FFC568",stroke:"#2B2530",strokeWidth:"2.6"}),c.jsx("path",{d:"M96,132 L103,132 L99.5,141 Z",fill:"#F7F3E8",stroke:"#2B2530",strokeWidth:"2",strokeLinejoin:"round"}),c.jsx("path",{d:"M98.4,138.5 L100.6,138.5 L99.5,141 Z",fill:"#173047"}),c.jsx("rect",{x:"95",y:"101",width:"9",height:"6",rx:"2",fill:"#E8563F",stroke:"#2B2530",strokeWidth:"2.4"})]})]}),Ut&&c.jsx("g",{className:"cp-crown-badge","aria-hidden":"true",children:c.jsx("path",{d:"M84,26 L92,36 L100,24 L108,36 L116,26 L114,44 L86,44 Z",fill:"#FFC800",stroke:"#E8A400",strokeWidth:"2",strokeLinejoin:"round"})})]})}export{Em as $,gm as A,Iy as B,$y as C,om as D,rm as E,k1 as F,Dm as G,hm as H,Lm as I,xm as J,cm as K,lm as L,Hm as M,tm as N,Py as O,Nm as P,_m as Q,im as R,sm as S,em as T,nm as U,uy as V,am as W,Sm as X,fm as Y,Um as Z,wm as _,ny as a,my as a0,B2 as a1,Wy as a2,mm as a3,Tm as a4,Ky as a5,Vy as a6,um as b,Xy as c,Z2 as d,w2 as e,Ts as f,I1 as g,Om as h,ly as i,c as j,Jy as k,Rm as l,Cm as m,jm as n,Mm as o,Am as p,zm as q,bl as r,G1 as s,dm as t,Ey as u,iy as v,vm as w,bm as x,ym as y,pm as z};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{H as Ct,g as Xt,d as _t,a as Tt,w as U,n as Z}from"./index-CU6ublfJ.js";import{l as Ue,b as Ze}from"./index-CU6ublfJ.js";import{s as P,w as Rt,x as At,c as ut,y as Dt,b as $t,d as jt,e as Bt,i as ht,T as et,f as nt,t as G}from"./transform-CzGDKG_M.js";import{a as dt,m as ft}from"./min-tv6RD-6E.js";import{o as yt}from"./ordinal-Cboi1Yqb.js";import{c as Ot}from"./colors-Cc3OSVma.js";import"./init-Gi6I4Gst.js";function Ht(t,e){let n,r=-1,a=-1;if(e===void 0)for(const l of t)++a,l!=null&&(n>l||n===void 0&&l>=l)&&(n=l,r=a);else for(let l of t)(l=e(l,++a,t))!=null&&(n>l||n===void 0&&l>=l)&&(n=l,r=a);return r}function It(t){let e;for(;e=t.sourceEvent;)t=e;return t}function F(t,e){if(t=It(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}}return[t.pageX,t.pageY]}const st={capture:!0,passive:!1};function lt(t){t.preventDefault(),t.stopImmediatePropagation()}function Pt(t){var e=t.document.documentElement,n=P(t).on("dragstart.drag",lt,st);"onselectstart"in e?n.on("selectstart.drag",lt,st):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Vt(t,e){var n=t.document.documentElement,r=P(t).on("dragstart.drag",null);e&&(r.on("click.drag",lt,st),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Wt=1e-12;function mt(t){return((t=Math.exp(t))+1/t)/2}function Yt(t){return((t=Math.exp(t))-1/t)/2}function Ft(t){return((t=Math.exp(2*t))-1)/(t+1)}const Lt=(function t(e,n,r){function a(l,h){var s=l[0],c=l[1],d=l[2],f=h[0],v=h[1],x=h[2],E=f-s,C=v-c,M=E*E+C*C,X,y;if(M<Wt)y=Math.log(x/d)/e,X=function(B){return[s+B*E,c+B*C,d*Math.exp(e*B*y)]};else{var T=Math.sqrt(M),$=(x*x-d*d+r*M)/(2*d*n*T),j=(x*x-d*d-r*M)/(2*x*n*T),A=Math.log(Math.sqrt($*$+1)-$),R=Math.log(Math.sqrt(j*j+1)-j);y=(R-A)/e,X=function(B){var V=B*y,W=mt(A),Y=d/(n*T)*(W*Ft(e*V+A)-Yt(A));return[s+Y*E,c+Y*C,d*W/mt(e*V+A)]}}return X.duration=y*1e3*e/Math.SQRT2,X}return a.rho=function(l){var h=Math.max(.001,+l),s=h*h,c=s*s;return t(h,s,c)},a})(Math.SQRT2,2,4),Gt=Ot("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");function Kt(t){return t.source}function qt(t){return t.target}function Nt(t){let e=Kt,n=qt,r=At,a=Dt,l=null,h=null,s=Rt(c);function c(){let d;const f=$t.call(arguments),v=e.apply(this,f),x=n.apply(this,f);if(l==null&&(h=t(d=s())),h.lineStart(),f[0]=v,h.point(+r.apply(this,f),+a.apply(this,f)),f[0]=x,h.point(+r.apply(this,f),+a.apply(this,f)),h.lineEnd(),d)return h=null,d+""||null}return c.source=function(d){return arguments.length?(e=d,c):e},c.target=function(d){return arguments.length?(n=d,c):n},c.x=function(d){return arguments.length?(r=typeof d=="function"?d:ut(+d),c):r},c.y=function(d){return arguments.length?(a=typeof d=="function"?d:ut(+d),c):a},c.context=function(d){return arguments.length?(d==null?l=h=null:h=t(l=d),c):l},c}function Ut(){return Nt(jt)}const Q=t=>()=>t;function Zt(t,{sourceEvent:e,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function it(t){t.stopImmediatePropagation()}function K(t){t.preventDefault(),t.stopImmediatePropagation()}function Qt(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Jt(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function gt(){return this.__zoom||ht}function te(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ee(){return navigator.maxTouchPoints||"ontouchstart"in this}function ne(t,e,n){var r=t.invertX(e[0][0])-n[0][0],a=t.invertX(e[1][0])-n[1][0],l=t.invertY(e[0][1])-n[0][1],h=t.invertY(e[1][1])-n[1][1];return t.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),h>l?(l+h)/2:Math.min(0,l)||Math.max(0,h))}function ie(){var t=Qt,e=Jt,n=ne,r=te,a=ee,l=[0,1/0],h=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Lt,d=Bt("start","zoom","end"),f,v,x,E=500,C=150,M=0,X=10;function y(o){o.property("__zoom",gt).on("wheel.zoom",V,{passive:!1}).on("mousedown.zoom",W).on("dblclick.zoom",Y).filter(a).on("touchstart.zoom",q).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(o,m,u,p){var k=o.selection?o.selection():o;k.property("__zoom",gt),o!==k?A(o,m,u,p):k.interrupt().each(function(){R(this,arguments).event(p).start().zoom(null,typeof m=="function"?m.apply(this,arguments):m).end()})},y.scaleBy=function(o,m,u,p){y.scaleTo(o,function(){var k=this.__zoom.k,w=typeof m=="function"?m.apply(this,arguments):m;return k*w},u,p)},y.scaleTo=function(o,m,u,p){y.transform(o,function(){var k=e.apply(this,arguments),w=this.__zoom,z=u==null?j(k):typeof u=="function"?u.apply(this,arguments):u,S=w.invert(z),i=typeof m=="function"?m.apply(this,arguments):m;return n($(T(w,i),z,S),k,h)},u,p)},y.translateBy=function(o,m,u,p){y.transform(o,function(){return n(this.__zoom.translate(typeof m=="function"?m.apply(this,arguments):m,typeof u=="function"?u.apply(this,arguments):u),e.apply(this,arguments),h)},null,p)},y.translateTo=function(o,m,u,p,k){y.transform(o,function(){var w=e.apply(this,arguments),z=this.__zoom,S=p==null?j(w):typeof p=="function"?p.apply(this,arguments):p;return n(ht.translate(S[0],S[1]).scale(z.k).translate(typeof m=="function"?-m.apply(this,arguments):-m,typeof u=="function"?-u.apply(this,arguments):-u),w,h)},p,k)};function T(o,m){return m=Math.max(l[0],Math.min(l[1],m)),m===o.k?o:new et(m,o.x,o.y)}function $(o,m,u){var p=m[0]-u[0]*o.k,k=m[1]-u[1]*o.k;return p===o.x&&k===o.y?o:new et(o.k,p,k)}function j(o){return[(+o[0][0]+ +o[1][0])/2,(+o[0][1]+ +o[1][1])/2]}function A(o,m,u,p){o.on("start.zoom",function(){R(this,arguments).event(p).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(p).end()}).tween("zoom",function(){var k=this,w=arguments,z=R(k,w).event(p),S=e.apply(k,w),i=u==null?j(S):typeof u=="function"?u.apply(k,w):u,g=Math.max(S[1][0]-S[0][0],S[1][1]-S[0][1]),b=k.__zoom,_=typeof m=="function"?m.apply(k,w):m,O=c(b.invert(i).concat(g/b.k),_.invert(i).concat(g/_.k));return function(H){if(H===1)H=_;else{var I=O(H),tt=g/I[2];H=new et(tt,i[0]-I[0]*tt,i[1]-I[1]*tt)}z.zoom(null,H)}})}function R(o,m,u){return!u&&o.__zooming||new B(o,m)}function B(o,m){this.that=o,this.args=m,this.active=0,this.sourceEvent=null,this.extent=e.apply(o,m),this.taps=0}B.prototype={event:function(o){return o&&(this.sourceEvent=o),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(o,m){return this.mouse&&o!=="mouse"&&(this.mouse[1]=m.invert(this.mouse[0])),this.touch0&&o!=="touch"&&(this.touch0[1]=m.invert(this.touch0[0])),this.touch1&&o!=="touch"&&(this.touch1[1]=m.invert(this.touch1[0])),this.that.__zoom=m,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(o){var m=P(this.that).datum();d.call(o,this.that,new Zt(o,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:d}),m)}};function V(o,...m){if(!t.apply(this,arguments))return;var u=R(this,m).event(o),p=this.__zoom,k=Math.max(l[0],Math.min(l[1],p.k*Math.pow(2,r.apply(this,arguments)))),w=F(o);if(u.wheel)(u.mouse[0][0]!==w[0]||u.mouse[0][1]!==w[1])&&(u.mouse[1]=p.invert(u.mouse[0]=w)),clearTimeout(u.wheel);else{if(p.k===k)return;u.mouse=[w,p.invert(w)],nt(this),u.start()}K(o),u.wheel=setTimeout(z,C),u.zoom("mouse",n($(T(p,k),u.mouse[0],u.mouse[1]),u.extent,h));function z(){u.wheel=null,u.end()}}function W(o,...m){if(x||!t.apply(this,arguments))return;var u=o.currentTarget,p=R(this,m,!0).event(o),k=P(o.view).on("mousemove.zoom",i,!0).on("mouseup.zoom",g,!0),w=F(o,u),z=o.clientX,S=o.clientY;Pt(o.view),it(o),p.mouse=[w,this.__zoom.invert(w)],nt(this),p.start();function i(b){if(K(b),!p.moved){var _=b.clientX-z,O=b.clientY-S;p.moved=_*_+O*O>M}p.event(b).zoom("mouse",n($(p.that.__zoom,p.mouse[0]=F(b,u),p.mouse[1]),p.extent,h))}function g(b){k.on("mousemove.zoom mouseup.zoom",null),Vt(b.view,p.moved),K(b),p.event(b).end()}}function Y(o,...m){if(t.apply(this,arguments)){var u=this.__zoom,p=F(o.changedTouches?o.changedTouches[0]:o,this),k=u.invert(p),w=u.k*(o.shiftKey?.5:2),z=n($(T(u,w),p,k),e.apply(this,m),h);K(o),s>0?P(this).transition().duration(s).call(A,z,p,o):P(this).call(y.transform,z,p,o)}}function q(o,...m){if(t.apply(this,arguments)){var u=o.touches,p=u.length,k=R(this,m,o.changedTouches.length===p).event(o),w,z,S,i;for(it(o),z=0;z<p;++z)S=u[z],i=F(S,this),i=[i,this.__zoom.invert(i),S.identifier],k.touch0?!k.touch1&&k.touch0[2]!==i[2]&&(k.touch1=i,k.taps=0):(k.touch0=i,w=!0,k.taps=1+!!f);f&&(f=clearTimeout(f)),w&&(k.taps<2&&(v=i[0],f=setTimeout(function(){f=null},E)),nt(this),k.start())}}function N(o,...m){if(this.__zooming){var u=R(this,m).event(o),p=o.changedTouches,k=p.length,w,z,S,i;for(K(o),w=0;w<k;++w)z=p[w],S=F(z,this),u.touch0&&u.touch0[2]===z.identifier?u.touch0[0]=S:u.touch1&&u.touch1[2]===z.identifier&&(u.touch1[0]=S);if(z=u.that.__zoom,u.touch1){var g=u.touch0[0],b=u.touch0[1],_=u.touch1[0],O=u.touch1[1],H=(H=_[0]-g[0])*H+(H=_[1]-g[1])*H,I=(I=O[0]-b[0])*I+(I=O[1]-b[1])*I;z=T(z,Math.sqrt(H/I)),S=[(g[0]+_[0])/2,(g[1]+_[1])/2],i=[(b[0]+O[0])/2,(b[1]+O[1])/2]}else if(u.touch0)S=u.touch0[0],i=u.touch0[1];else return;u.zoom("touch",n($(z,S,i),u.extent,h))}}function L(o,...m){if(this.__zooming){var u=R(this,m).event(o),p=o.changedTouches,k=p.length,w,z;for(it(o),x&&clearTimeout(x),x=setTimeout(function(){x=null},E),w=0;w<k;++w)z=p[w],u.touch0&&u.touch0[2]===z.identifier?delete u.touch0:u.touch1&&u.touch1[2]===z.identifier&&delete u.touch1;if(u.touch1&&!u.touch0&&(u.touch0=u.touch1,delete u.touch1),u.touch0)u.touch0[1]=this.__zoom.invert(u.touch0[0]);else if(u.end(),u.taps===2&&(z=F(z,this),Math.hypot(v[0]-z[0],v[1]-z[1])<X)){var S=P(this).on("dblclick.zoom");S&&S.apply(this,arguments)}}}return y.wheelDelta=function(o){return arguments.length?(r=typeof o=="function"?o:Q(+o),y):r},y.filter=function(o){return arguments.length?(t=typeof o=="function"?o:Q(!!o),y):t},y.touchable=function(o){return arguments.length?(a=typeof o=="function"?o:Q(!!o),y):a},y.extent=function(o){return arguments.length?(e=typeof o=="function"?o:Q([[+o[0][0],+o[0][1]],[+o[1][0],+o[1][1]]]),y):e},y.scaleExtent=function(o){return arguments.length?(l[0]=+o[0],l[1]=+o[1],y):[l[0],l[1]]},y.translateExtent=function(o){return arguments.length?(h[0][0]=+o[0][0],h[1][0]=+o[1][0],h[0][1]=+o[0][1],h[1][1]=+o[1][1],y):[[h[0][0],h[0][1]],[h[1][0],h[1][1]]]},y.constrain=function(o){return arguments.length?(n=o,y):n},y.duration=function(o){return arguments.length?(s=+o,y):s},y.interpolate=function(o){return arguments.length?(c=o,y):c},y.on=function(){var o=d.on.apply(d,arguments);return o===d?y:o},y.clickDistance=function(o){return arguments.length?(M=(o=+o)*o,y):Math.sqrt(M)},y.tapDistance=function(o){return arguments.length?(X=+o,y):X},y}const vt=typeof navigator<"u"&&navigator.userAgent.includes("Macintosh"),re=yt(Gt),xt=(t=1,e=3,n=2)=>r=>t+e/n**r.state.depth,kt={autoFit:!1,duration:500,embedGlobalCSS:!0,fitRatio:.95,maxInitialScale:2,scrollForPan:vt,initialExpandLevel:-1,zoom:!0,pan:!0,toggleRecursively:!1,color:t=>{var e;return re(`${((e=t.state)==null?void 0:e.path)||""}`)},lineWidth:xt(),maxWidth:0,nodeMinHeight:16,paddingX:8,spacingHorizontal:80,spacingVertical:5};function Ge(t){const e={},n={...t},{color:r,colorFreezeLevel:a,lineWidth:l}=n;if((r==null?void 0:r.length)===1){const h=r[0];e.color=()=>h}else if(r!=null&&r.length){const h=yt(r);e.color=s=>h(`${s.state.path}`)}if(a){const h=e.color||kt.color;e.color=s=>(s={...s,state:{...s.state,path:s.state.path.split(".").slice(0,a).join(".")}},h(s))}if(l){const h=Array.isArray(l)?l:[l,0,1];e.lineWidth=xt(...h)}return["duration","fitRatio","initialExpandLevel","maxInitialScale","maxWidth","nodeMinHeight","paddingX","spacingHorizontal","spacingVertical"].forEach(h=>{const s=n[h];typeof s=="number"&&(e[h]=s)}),["zoom","pan"].forEach(h=>{const s=n[h];s!=null&&(e[h]=!!s)}),e}function ae(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(e>>>0).toString(36)}function D(t){if(typeof t=="string"){const n=t;t=r=>r.matches(n)}const e=t;return function(){let n=Array.from(this.childNodes);return e&&(n=n.filter(r=>e(r))),n}}function oe(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function se(){return this.eachAfter(oe)}function le(t){var e=this,n,r=[e],a,l,h;do for(n=r.reverse(),r=[];e=n.pop();)if(t(e),a=e.children,a)for(l=0,h=a.length;l<h;++l)r.push(a[l]);while(r.length);return this}function he(t){for(var e=this,n=[e],r,a;e=n.pop();)if(t(e),r=e.children,r)for(a=r.length-1;a>=0;--a)n.push(r[a]);return this}function ce(t){for(var e=this,n=[e],r=[],a,l,h;e=n.pop();)if(r.push(e),a=e.children,a)for(l=0,h=a.length;l<h;++l)n.push(a[l]);for(;e=r.pop();)t(e);return this}function ue(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,a=r&&r.length;--a>=0;)n+=r[a].value;e.value=n})}function de(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function fe(t){for(var e=this,n=me(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var a=r.length;t!==n;)r.splice(a,0,t),t=t.parent;return r}function me(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),a=null;for(t=n.pop(),e=r.pop();t===e;)a=t,t=n.pop(),e=r.pop();return a}function ge(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function pe(){var t=[];return this.each(function(e){t.push(e)}),t}function ye(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function ve(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function ct(t,e){var n=new J(t),r=+t.value&&(n.value=t.value),a,l=[n],h,s,c,d;for(e==null&&(e=ke);a=l.pop();)if(r&&(a.value=+a.data.value),(s=e(a.data))&&(d=s.length))for(a.children=new Array(d),c=d-1;c>=0;--c)l.push(h=a.children[c]=new J(s[c])),h.parent=a,h.depth=a.depth+1;return n.eachBefore(ze)}function xe(){return ct(this).eachBefore(we)}function ke(t){return t.children}function we(t){t.data=t.data.data}function ze(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function J(t){this.data=t,this.depth=this.height=0,this.parent=null}J.prototype=ct.prototype={constructor:J,count:se,each:le,eachAfter:ce,eachBefore:he,sum:ue,sort:de,path:fe,ancestors:ge,descendants:pe,leaves:ye,links:ve,copy:xe};const be="2.1.2",Ee={version:be},{version:Se}=Ee,Me=Object.freeze({children:t=>t.children,nodeSize:t=>t.data.size,spacing:0});function zt(t){const e=Object.assign({},Me,t);function n(s){const c=e[s];return typeof c=="function"?c:()=>c}function r(s){const c=h(l(),s,d=>d.children);return c.update(),c.data}function a(){const s=n("nodeSize"),c=n("spacing");return class wt extends ct.prototype.constructor{constructor(f){super(f)}copy(){const f=h(this.constructor,this,v=>v.children);return f.each(v=>v.data=v.data.data),f}get size(){return s(this)}spacing(f){return c(this,f)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const f=this.ancestors();return f[f.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return this.children===null}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((f,v)=>wt.maxExtents(f,v.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(f,v){return{top:Math.min(f.top,v.top),bottom:Math.max(f.bottom,v.bottom),left:Math.min(f.left,v.left),right:Math.max(f.right,v.right)}}}}function l(){const s=a(),c=n("nodeSize"),d=n("spacing");return class extends s{constructor(f){super(f),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return c(this.data)}spacing(f){return d(this.data,f.data)}get x(){return this.data.x}set x(f){this.data.x=f}get y(){return this.data.y}set y(f){this.data.y=f}update(){return bt(this),Et(this),this}}}function h(s,c,d){const f=(v,x)=>{const E=new s(v);Object.assign(E,{parent:x,depth:x===null?0:x.depth+1,height:0,length:1});const C=d(v)||[];return E.children=C.length===0?null:C.map(M=>f(M,E)),E.children&&Object.assign(E,E.children.reduce((M,X)=>({height:Math.max(M.height,X.height+1),length:M.length+X.length}),E)),E};return f(c,null)}return Object.assign(r,{nodeSize(s){return arguments.length?(e.nodeSize=s,r):e.nodeSize},spacing(s){return arguments.length?(e.spacing=s,r):e.spacing},children(s){return arguments.length?(e.children=s,r):e.children},hierarchy(s,c){const d=typeof c>"u"?e.children:c;return h(a(),s,d)},dump(s){const c=n("nodeSize"),d=f=>v=>{const x=f+" ",E=f+" ",{x:C,y:M}=v,X=c(v),y=v.children||[],T=y.length===0?" ":`,${x}children: [${E}${y.map(d(E)).join(E)}${x}],${f}`;return`{ size: [${X.join(", ")}],${x}x: ${C}, y: ${M}${T}},`};return d(`
|
|
2
|
+
`)(s)}}),r}zt.version=Se;const bt=(t,e=0)=>(t.y=e,(t.children||[]).reduce((n,r)=>{const[a,l]=n;bt(r,t.y+t.ySize);const h=(a===0?r.lExt:r.rExt).bottom;a!==0&&Xe(t,a,l);const s=Be(h,a,l);return[a+1,s]},[0,null]),Ce(t),je(t),t),Et=(t,e,n)=>{typeof e>"u"&&(e=-t.relX-t.prelim,n=0);const r=e+t.relX;return t.relX=r+t.prelim-n,t.prelim=0,t.x=n+t.relX,(t.children||[]).forEach(a=>Et(a,r,t.x)),t},Ce=t=>{(t.children||[]).reduce((e,n)=>{const[r,a]=e,l=r+n.shift,h=a+l+n.change;return n.relX+=h,[l,h]},[0,0])},Xe=(t,e,n)=>{const r=t.children[e-1],a=t.children[e];let l=r,h=r.relX,s=a,c=a.relX,d=!0;for(;l&&s;){l.bottom>n.lowY&&(n=n.next);const f=h+l.prelim-(c+s.prelim)+l.xSize/2+s.xSize/2+l.spacing(s);(f>0||f<0&&d)&&(c+=f,_e(a,f),Te(t,e,n.index,f)),d=!1;const v=l.bottom,x=s.bottom;v<=x&&(l=Ae(l),l&&(h+=l.relX)),v>=x&&(s=Re(s),s&&(c+=s.relX))}!l&&s?De(t,e,s,c):l&&!s&&$e(t,e,l,h)},_e=(t,e)=>{t.relX+=e,t.lExtRelX+=e,t.rExtRelX+=e},Te=(t,e,n,r)=>{const a=t.children[e],l=e-n;if(l>1){const h=r/l;t.children[n+1].shift+=h,a.shift-=h,a.change-=r-h}},Re=t=>t.hasChildren?t.firstChild:t.lThr,Ae=t=>t.hasChildren?t.lastChild:t.rThr,De=(t,e,n,r)=>{const a=t.firstChild,l=a.lExt,h=t.children[e];l.lThr=n;const s=r-n.relX-a.lExtRelX;l.relX+=s,l.prelim-=s,a.lExt=h.lExt,a.lExtRelX=h.lExtRelX},$e=(t,e,n,r)=>{const a=t.children[e],l=a.rExt,h=t.children[e-1];l.rThr=n;const s=r-n.relX-a.rExtRelX;l.relX+=s,l.prelim-=s,a.rExt=h.rExt,a.rExtRelX=h.rExtRelX},je=t=>{if(t.hasChildren){const e=t.firstChild,n=t.lastChild,r=(e.prelim+e.relX-e.xSize/2+n.relX+n.prelim+n.xSize/2)/2;Object.assign(t,{prelim:r,lExt:e.lExt,lExtRelX:e.lExtRelX,rExt:n.rExt,rExtRelX:n.rExtRelX})}},Be=(t,e,n)=>{for(;n!==null&&t>=n.lowY;)n=n.next;return{lowY:t,index:e,next:n}},St=".markmap{--markmap-max-width: 9999px;--markmap-a-color: #0097e6;--markmap-a-hover-color: #00a8ff;--markmap-code-bg: #f0f0f0;--markmap-code-color: #555;--markmap-highlight-bg: #ffeaa7;--markmap-table-border: 1px solid currentColor;--markmap-font: 300 16px/20px sans-serif;--markmap-circle-open-bg: #fff;--markmap-text-color: #333;--markmap-highlight-node-bg: #ff02;font:var(--markmap-font);color:var(--markmap-text-color)}.markmap-link{fill:none}.markmap-node>circle{cursor:pointer}.markmap-foreign{display:inline-block}.markmap-foreign p{margin:0}.markmap-foreign a{color:var(--markmap-a-color)}.markmap-foreign a:hover{color:var(--markmap-a-hover-color)}.markmap-foreign code{padding:.25em;font-size:calc(1em - 2px);color:var(--markmap-code-color);background-color:var(--markmap-code-bg);border-radius:2px}.markmap-foreign pre{margin:0}.markmap-foreign pre>code{display:block}.markmap-foreign del{text-decoration:line-through}.markmap-foreign em{font-style:italic}.markmap-foreign strong{font-weight:700}.markmap-foreign mark{background:var(--markmap-highlight-bg)}.markmap-foreign table,.markmap-foreign th,.markmap-foreign td{border-collapse:collapse;border:var(--markmap-table-border)}.markmap-foreign img{display:inline-block}.markmap-foreign svg{fill:currentColor}.markmap-foreign>div{width:var(--markmap-max-width);text-align:left}.markmap-foreign>div>div{display:inline-block}.markmap-highlight rect{fill:var(--markmap-highlight-node-bg)}.markmap-dark .markmap{--markmap-code-bg: #1a1b26;--markmap-code-color: #ddd;--markmap-circle-open-bg: #444;--markmap-text-color: #eee}",Ke=St,rt="g.markmap-node",Oe="path.markmap-link",He="g.markmap-highlight",at=Ut();function pt(t,e){const n=Ht(t,e);return t[n]}function ot(t){t.stopPropagation()}const Ie=new Ct;class Mt{constructor(e,n){this.options={...kt},this._disposeList=[],this.handleZoom=r=>{const{transform:a}=r;this.g.attr("transform",a)},this.handlePan=r=>{r.preventDefault();const a=G(this.svg.node()),l=a.translate(-r.deltaX/a.k,-r.deltaY/a.k);this.svg.call(this.zoom.transform,l)},this.handleClick=(r,a)=>{let l=this.options.toggleRecursively;(vt?r.metaKey:r.ctrlKey)&&(l=!l),this.toggleNode(a,l)},this.ensureView=this.ensureVisible,this.svg=e.datum?e:P(e),this.styleNode=this.svg.append("style"),this.zoom=ie().filter(r=>this.options.scrollForPan&&r.type==="wheel"?r.ctrlKey&&!r.button:(!r.ctrlKey||r.type==="wheel")&&!r.button).on("zoom",this.handleZoom),this.setOptions(n),this.state={id:this.options.id||this.svg.attr("id")||Xt(),rect:{x1:0,y1:0,x2:0,y2:0}},this.g=this.svg.append("g"),this.g.append("g").attr("class","markmap-highlight"),this._observer=new ResizeObserver(_t(()=>{this.renderData()},100)),this._disposeList.push(Ie.tap(()=>{this.setData()}),()=>this._observer.disconnect())}getStyleContent(){const{style:e}=this.options,{id:n}=this.state,r=typeof e=="function"?e(n):"";return[this.options.embedGlobalCSS&&St,r].filter(Boolean).join(`
|
|
3
|
+
`)}updateStyle(){this.svg.attr("class",Tt(this.svg.attr("class"),"markmap",this.state.id));const e=this.getStyleContent();this.styleNode.text(e)}async toggleNode(e,n=!1){var r,a;const l=(r=e.payload)!=null&&r.fold?0:1;n?U(e,(h,s)=>{h.payload={...h.payload,fold:l},s()}):e.payload={...e.payload,fold:(a=e.payload)!=null&&a.fold?0:1},await this.renderData(e)}_initializeData(e){let n=0;const{color:r,initialExpandLevel:a}=this.options;let l=0,h=0;return U(e,(s,c,d)=>{var f,v,x,E;h+=1,s.children=(f=s.children)==null?void 0:f.map(M=>({...M})),n+=1,s.state={...s.state,depth:h,id:n,rect:{x:0,y:0,width:0,height:0},size:[0,0]},s.state.key=[(v=d==null?void 0:d.state)==null?void 0:v.id,s.state.id].filter(Boolean).join(".")+ae(s.content),s.state.path=[(x=d==null?void 0:d.state)==null?void 0:x.path,s.state.id].filter(Boolean).join("."),r(s);const C=((E=s.payload)==null?void 0:E.fold)===2;C?l+=1:(l||a>=0&&s.state.depth>=a)&&(s.payload={...s.payload,fold:1}),c(),C&&(l-=1),h-=1}),e}_relayout(){if(!this.state.data)return;this.g.selectAll(D(rt)).selectAll(D("foreignObject")).each(function(c){var d;const f=(d=this.firstChild)==null?void 0:d.firstChild,v=[f.scrollWidth,f.scrollHeight];c.state.size=v});const{lineWidth:e,paddingX:n,spacingHorizontal:r,spacingVertical:a}=this.options,l=zt({}).children(c=>{var d;if(!((d=c.payload)!=null&&d.fold))return c.children}).nodeSize(c=>{const[d,f]=c.data.state.size;return[f,d+(d?n*2:0)+r]}).spacing((c,d)=>(c.parent===d.parent?a:a*2)+e(c.data)),h=l.hierarchy(this.state.data);l(h);const s=h.descendants();s.forEach(c=>{const d=c.data;d.state.rect={x:c.y,y:c.x-c.xSize/2,width:c.ySize-r,height:c.xSize}}),this.state.rect={x1:ft(s,c=>c.data.state.rect.x)||0,y1:ft(s,c=>c.data.state.rect.y)||0,x2:dt(s,c=>c.data.state.rect.x+c.data.state.rect.width)||0,y2:dt(s,c=>c.data.state.rect.y+c.data.state.rect.height)||0}}setOptions(e){this.options={...this.options,...e},this.options.zoom?this.svg.call(this.zoom):this.svg.on(".zoom",null),this.options.pan?this.svg.on("wheel",this.handlePan):this.svg.on("wheel",null)}async setData(e,n){n&&this.setOptions(n),e&&(this.state.data=this._initializeData(e)),this.state.data&&(this.updateStyle(),await this.renderData())}async setHighlight(e){this.state.highlight=e||void 0,await this.renderData()}_getHighlightRect(e){const n=this.svg.node(),r=4/G(n).k,a={...e.state.rect};return a.x-=r,a.y-=r,a.width+=2*r,a.height+=2*r,a}async renderData(e){const{paddingX:n,autoFit:r,color:a,maxWidth:l,lineWidth:h}=this.options,s=this.state.data;if(!s)return;const c={},d={},f=[];U(s,(i,g,b)=>{var _;(_=i.payload)!=null&&_.fold||g(),c[i.state.id]=i,b&&(d[i.state.id]=b.state.id),f.push(i)});const v={},x={},E=i=>{!i||v[i.state.id]||U(i,(g,b)=>{v[g.state.id]=i.state.id,b()})},C=i=>x[v[i.state.id]]||s.state.rect,M=i=>(c[v[i.state.id]]||s).state.rect;x[s.state.id]=s.state.rect,e&&E(e);let{highlight:X}=this.state;X&&!c[X.state.id]&&(X=void 0);let y=this.g.selectAll(D(He)).selectAll(D("rect")).data(X?[this._getHighlightRect(X)]:[]).join("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height);const T=this.g.selectAll(D(rt)).each(i=>{x[i.state.id]=i.state.rect}).data(f,i=>i.state.key),$=T.enter().append("g").attr("data-depth",i=>i.state.depth).attr("data-path",i=>i.state.path).each(i=>{E(c[d[i.state.id]])}),j=T.exit().each(i=>{E(c[d[i.state.id]])}),A=T.merge($).attr("class",i=>{var g;return["markmap-node",((g=i.payload)==null?void 0:g.fold)&&"markmap-fold"].filter(Boolean).join(" ")}),R=A.selectAll(D("line")).data(i=>[i],i=>i.state.key),B=R.enter().append("line").attr("stroke",i=>a(i)).attr("stroke-width",0),V=R.merge(B),W=A.selectAll(D("circle")).data(i=>{var g;return(g=i.children)!=null&&g.length?[i]:[]},i=>i.state.key),Y=W.enter().append("circle").attr("stroke-width",0).attr("r",0).on("click",(i,g)=>this.handleClick(i,g)).on("mousedown",ot).merge(W).attr("stroke",i=>a(i)).attr("fill",i=>{var g;return(g=i.payload)!=null&&g.fold&&i.children?a(i):"var(--markmap-circle-open-bg)"}),q=this._observer,N=A.selectAll(D("foreignObject")).data(i=>[i],i=>i.state.key),L=N.enter().append("foreignObject").attr("class","markmap-foreign").attr("x",n).attr("y",0).style("opacity",0).on("mousedown",ot).on("dblclick",ot);L.append("xhtml:div").append("xhtml:div").html(i=>i.content).attr("xmlns","http://www.w3.org/1999/xhtml"),L.each(function(){var i;const g=(i=this.firstChild)==null?void 0:i.firstChild;q.observe(g)});const o=j.selectAll(D("foreignObject"));o.each(function(){var i;const g=(i=this.firstChild)==null?void 0:i.firstChild;q.unobserve(g)});const m=L.merge(N),u=f.flatMap(i=>{var g;return(g=i.payload)!=null&&g.fold?[]:i.children.map(b=>({source:i,target:b}))}),p=this.g.selectAll(D(Oe)).data(u,i=>i.target.state.key),k=p.exit(),w=p.enter().insert("path","g").attr("class","markmap-link").attr("data-depth",i=>i.target.state.depth).attr("data-path",i=>i.target.state.path).attr("d",i=>{const g=C(i.target),b=[g.x+g.width,g.y+g.height];return at({source:b,target:b})}).attr("stroke-width",0).merge(p);this.svg.style("--markmap-max-width",l?`${l}px`:null),await new Promise(requestAnimationFrame),this._relayout(),y=y.data(X?[this._getHighlightRect(X)]:[]).join("rect"),this.transition(y).attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height),$.attr("transform",i=>{const g=C(i);return`translate(${g.x+g.width-i.state.rect.width},${g.y+g.height-i.state.rect.height})`}),this.transition(j).attr("transform",i=>{const g=M(i),b=g.x+g.width-i.state.rect.width,_=g.y+g.height-i.state.rect.height;return`translate(${b},${_})`}).remove(),this.transition(A).attr("transform",i=>`translate(${i.state.rect.x},${i.state.rect.y})`);const z=j.selectAll(D("line"));this.transition(z).attr("x1",i=>i.state.rect.width).attr("stroke-width",0),B.attr("x1",i=>i.state.rect.width).attr("x2",i=>i.state.rect.width),V.attr("y1",i=>i.state.rect.height+h(i)/2).attr("y2",i=>i.state.rect.height+h(i)/2),this.transition(V).attr("x1",-1).attr("x2",i=>i.state.rect.width+2).attr("stroke",i=>a(i)).attr("stroke-width",h);const S=j.selectAll(D("circle"));this.transition(S).attr("r",0).attr("stroke-width",0),Y.attr("cx",i=>i.state.rect.width).attr("cy",i=>i.state.rect.height+h(i)/2),this.transition(Y).attr("r",6).attr("stroke-width","1.5"),this.transition(o).style("opacity",0),m.attr("width",i=>Math.max(0,i.state.rect.width-n*2)).attr("height",i=>i.state.rect.height),this.transition(m).style("opacity",1),this.transition(k).attr("d",i=>{const g=M(i.target),b=[g.x+g.width,g.y+g.height+h(i.target)/2];return at({source:b,target:b})}).attr("stroke-width",0).remove(),this.transition(w).attr("stroke",i=>a(i.target)).attr("stroke-width",i=>h(i.target)).attr("d",i=>{const g=i.source,b=i.target,_=[g.state.rect.x+g.state.rect.width,g.state.rect.y+g.state.rect.height+h(g)/2],O=[b.state.rect.x,b.state.rect.y+b.state.rect.height+h(b)/2];return at({source:_,target:O})}),r&&this.fit()}transition(e){const{duration:n}=this.options;return e.transition().duration(n)}async fit(e=this.options.maxInitialScale){const n=this.svg.node(),{width:r,height:a}=n.getBoundingClientRect(),{fitRatio:l}=this.options,{x1:h,y1:s,x2:c,y2:d}=this.state.rect,f=c-h,v=d-s,x=Math.min(r/f*l,a/v*l,e),E=ht.translate((r-f*x)/2-h*x,(a-v*x)/2-s*x).scale(x);return this.transition(this.svg).call(this.zoom.transform,E).end().catch(Z)}findElement(e){let n;return this.g.selectAll(D(rt)).each(function(r){r===e&&(n={data:r,g:this})}),n}async ensureVisible(e,n){var r;const a=(r=this.findElement(e))==null?void 0:r.data;if(!a)return;const l=this.svg.node(),h=l.getBoundingClientRect(),s=G(l),[c,d]=[a.state.rect.x,a.state.rect.x+a.state.rect.width+2].map(y=>y*s.k+s.x),[f,v]=[a.state.rect.y,a.state.rect.y+a.state.rect.height].map(y=>y*s.k+s.y),x={left:0,right:0,top:0,bottom:0,...n},E=[x.left-c,h.width-x.right-d],C=[x.top-f,h.height-x.bottom-v],M=E[0]*E[1]>0?pt(E,Math.abs)/s.k:0,X=C[0]*C[1]>0?pt(C,Math.abs)/s.k:0;if(M||X){const y=s.translate(M,X);return this.transition(this.svg).call(this.zoom.transform,y).end().catch(Z)}}async centerNode(e,n){var r;const a=(r=this.findElement(e))==null?void 0:r.data;if(!a)return;const l=this.svg.node(),h=l.getBoundingClientRect(),s=G(l),c=(a.state.rect.x+a.state.rect.width/2)*s.k+s.x,d=(a.state.rect.y+a.state.rect.height/2)*s.k+s.y,f={left:0,right:0,top:0,bottom:0,...n},v=(f.left+h.width-f.right)/2,x=(f.top+h.height-f.bottom)/2,E=(v-c)/s.k,C=(x-d)/s.k;if(E||C){const M=s.translate(E,C);return this.transition(this.svg).call(this.zoom.transform,M).end().catch(Z)}}async rescale(e){const n=this.svg.node(),{width:r,height:a}=n.getBoundingClientRect(),l=r/2,h=a/2,s=G(n),c=s.translate((l-s.x)*(1-e)/s.k,(h-s.y)*(1-e)/s.k).scale(e);return this.transition(this.svg).call(this.zoom.transform,c).end().catch(Z)}destroy(){this.svg.on(".zoom",null),this.svg.html(null),this._disposeList.forEach(e=>{e()})}static create(e,n,r=null){const a=new Mt(e,n);return r&&a.setData(r).then(()=>{a.fit()}),a}}export{Mt as Markmap,D as childSelector,re as defaultColorFn,kt as defaultOptions,Ge as deriveOptions,Ke as globalCSS,vt as isMacintosh,xt as lineWidthFactory,Ue as loadCSS,Ze as loadJS,Ie as refreshHook,ae as simpleHash};
|