(window.saladictEntry=window.saladictEntry||[]).push([[115],{1353:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),c=a.n(n),l="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;const r=e=>{const{tag:t="div",html:a,...r}=e,s=Object(n.useMemo)(()=>{try{const e=document.createDocumentFragment(),t=(new DOMParser).parseFromString(a,"text/html");return Array.from(t.body.childNodes).forEach(t=>{e.appendChild(t)}),e}catch(e){!1}return null},[a]),[i,m]=Object(n.useState)(null);return l(()=>{if(s&&i){for(;i.childNodes.length>0;)i.childNodes[0].remove();i.appendChild(s)}},[s,i]),c.a.createElement(t,{...r,ref:m})}},652:function(e,t,a){"use strict";a.r(t),a.d(t,"DictBing",(function(){return s}));var n=a(0),c=a.n(n),l=a(123),r=a(1353);const s=({result:e})=>{switch(e.type){case"lex":return function(e){return c.a.createElement(c.a.Fragment,null,c.a.createElement("h1",{className:"dictBing-Title"},e.title),e.phsym&&c.a.createElement("ul",{className:"dictBing-Phsym"},e.phsym.map(e=>c.a.createElement("li",{className:"dictBing-PhsymItem",key:e.lang+e.pron},e.lang," ",c.a.createElement(l.c,{src:e.pron})))),e.cdef&&c.a.createElement("ul",{className:"dictBing-Cdef"},e.cdef.map(e=>c.a.createElement("li",{className:"dictBing-CdefItem",key:e.pos},c.a.createElement("span",{className:"dictBing-CdefItem_Pos"},e.pos),c.a.createElement("span",{className:"dictBing-CdefItem_Def"},e.def)))),e.infs&&c.a.createElement("ul",{className:"dictBing-Inf"},"词形：",e.infs.map(e=>c.a.createElement("li",{className:"dictBing-InfItem",key:e},e))),e.sentences&&c.a.createElement("ol",{className:"dictBing-SentenceList"},e.sentences.map(e=>c.a.createElement("li",{className:"dictBing-SentenceItem",key:e.en},e.en&&c.a.createElement("p",null,c.a.createElement(r.a,{tag:"span",html:e.en}),c.a.createElement(l.c,{src:e.mp3})),e.chs&&c.a.createElement(r.a,{tag:"p",html:e.chs}),e.source&&c.a.createElement("footer",{className:"dictBing-SentenceSource"},e.source)))))}(e);case"machine":return function(e){return c.a.createElement("p",null,e.mt)}(e);case"related":return function(e){return c.a.createElement(c.a.Fragment,null,c.a.createElement("h1",{className:"dictBing-Related_Title"},e.title),e.defs.map(e=>c.a.createElement(c.a.Fragment,{key:e.title},c.a.createElement("h2",{className:"dictBing-Related_Title"},e.title),c.a.createElement("ul",null,e.meanings.map(e=>c.a.createElement("li",{className:"dictBing-Related_Meaning",key:e.word},c.a.createElement("a",{className:"dictBing-Related_Meaning_Word",href:e.href},e.word),c.a.createElement("span",{className:"dictBing-Related_Meaning_Def"},e.def)))))))}(e);default:return null}};t.default=s}}]);