/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */

"use strict";(self.webpackChunk_nocobase_plugin_ai=self.webpackChunk_nocobase_plugin_ai||[]).push([["124"],{3770:function(e,t,r){r.r(t),r.d(t,{CodeHighlight:function(){return i}});var n=r(8156),o=r.n(n),l=r(9774),c=r(9595),u=r(8005),a=r(3772),i=function(e){var t,r,n=e.language,i=e.value,f=e.height,b=e.scrollToBottom,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["language","value","height","scrollToBottom"]),p=(0,a.useGlobalTheme)().isDarkTheme,O=o().useRef(null);o().useEffect(function(){if(!0===b){var e;null==(e=O.current)||e.scrollIntoView({behavior:"auto"})}},[i,b]);var g=o().createElement(l.Z,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},s),r=r={PreTag:"div",language:n,style:p?c.Z:u.Z},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t),i);return f||b?o().createElement("div",{style:{maxHeight:null!=f?f:"500px",overflowY:"auto"}},g,o().createElement("div",{ref:O})):g}}}]);