You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constant.tsx 52KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788
  1. import { ReactComponent as AkShareIcon } from '@/assets/svg/akshare.svg';
  2. import { ReactComponent as ArXivIcon } from '@/assets/svg/arxiv.svg';
  3. import { ReactComponent as baiduFanyiIcon } from '@/assets/svg/baidu-fanyi.svg';
  4. import { ReactComponent as BaiduIcon } from '@/assets/svg/baidu.svg';
  5. import { ReactComponent as BingIcon } from '@/assets/svg/bing.svg';
  6. import { ReactComponent as ConcentratorIcon } from '@/assets/svg/concentrator.svg';
  7. import { ReactComponent as DeepLIcon } from '@/assets/svg/deepl.svg';
  8. import { ReactComponent as DuckIcon } from '@/assets/svg/duck.svg';
  9. import { ReactComponent as ExeSqlIcon } from '@/assets/svg/exesql.svg';
  10. import { ReactComponent as GithubIcon } from '@/assets/svg/github.svg';
  11. import { ReactComponent as GoogleScholarIcon } from '@/assets/svg/google-scholar.svg';
  12. import { ReactComponent as GoogleIcon } from '@/assets/svg/google.svg';
  13. import { ReactComponent as Jin10Icon } from '@/assets/svg/jin10.svg';
  14. import { ReactComponent as KeywordIcon } from '@/assets/svg/keyword.svg';
  15. import { ReactComponent as NoteIcon } from '@/assets/svg/note.svg';
  16. import { ReactComponent as PubMedIcon } from '@/assets/svg/pubmed.svg';
  17. import { ReactComponent as QWeatherIcon } from '@/assets/svg/qweather.svg';
  18. import { ReactComponent as SwitchIcon } from '@/assets/svg/switch.svg';
  19. import { ReactComponent as TuShareIcon } from '@/assets/svg/tushare.svg';
  20. import { ReactComponent as WenCaiIcon } from '@/assets/svg/wencai.svg';
  21. import { ReactComponent as WikipediaIcon } from '@/assets/svg/wikipedia.svg';
  22. import { ReactComponent as YahooFinanceIcon } from '@/assets/svg/yahoo-finance.svg';
  23. import { variableEnabledFieldMap } from '@/constants/chat';
  24. import i18n from '@/locales/config';
  25. // DuckDuckGo's channel options
  26. export enum Channel {
  27. Text = 'text',
  28. News = 'news',
  29. }
  30. import {
  31. BranchesOutlined,
  32. DatabaseOutlined,
  33. FormOutlined,
  34. MergeCellsOutlined,
  35. MessageOutlined,
  36. RocketOutlined,
  37. SendOutlined,
  38. SlidersOutlined,
  39. } from '@ant-design/icons';
  40. import upperFirst from 'lodash/upperFirst';
  41. export enum Operator {
  42. Begin = 'Begin',
  43. Retrieval = 'Retrieval',
  44. Generate = 'Generate',
  45. Answer = 'Answer',
  46. Categorize = 'Categorize',
  47. Message = 'Message',
  48. Relevant = 'Relevant',
  49. RewriteQuestion = 'RewriteQuestion',
  50. KeywordExtract = 'KeywordExtract',
  51. Baidu = 'Baidu',
  52. DuckDuckGo = 'DuckDuckGo',
  53. Wikipedia = 'Wikipedia',
  54. PubMed = 'PubMed',
  55. ArXiv = 'ArXiv',
  56. Google = 'Google',
  57. Bing = 'Bing',
  58. GoogleScholar = 'GoogleScholar',
  59. DeepL = 'DeepL',
  60. GitHub = 'GitHub',
  61. BaiduFanyi = 'BaiduFanyi',
  62. QWeather = 'QWeather',
  63. ExeSQL = 'ExeSQL',
  64. Switch = 'Switch',
  65. WenCai = 'WenCai',
  66. AkShare = 'AkShare',
  67. YahooFinance = 'YahooFinance',
  68. Jin10 = 'Jin10',
  69. Concentrator = 'Concentrator',
  70. TuShare = 'TuShare',
  71. Note = 'Note',
  72. }
  73. export const operatorIconMap = {
  74. [Operator.Retrieval]: RocketOutlined,
  75. [Operator.Generate]: MergeCellsOutlined,
  76. [Operator.Answer]: SendOutlined,
  77. [Operator.Begin]: SlidersOutlined,
  78. [Operator.Categorize]: DatabaseOutlined,
  79. [Operator.Message]: MessageOutlined,
  80. [Operator.Relevant]: BranchesOutlined,
  81. [Operator.RewriteQuestion]: FormOutlined,
  82. [Operator.KeywordExtract]: KeywordIcon,
  83. [Operator.DuckDuckGo]: DuckIcon,
  84. [Operator.Baidu]: BaiduIcon,
  85. [Operator.Wikipedia]: WikipediaIcon,
  86. [Operator.PubMed]: PubMedIcon,
  87. [Operator.ArXiv]: ArXivIcon,
  88. [Operator.Google]: GoogleIcon,
  89. [Operator.Bing]: BingIcon,
  90. [Operator.GoogleScholar]: GoogleScholarIcon,
  91. [Operator.DeepL]: DeepLIcon,
  92. [Operator.GitHub]: GithubIcon,
  93. [Operator.BaiduFanyi]: baiduFanyiIcon,
  94. [Operator.QWeather]: QWeatherIcon,
  95. [Operator.ExeSQL]: ExeSqlIcon,
  96. [Operator.Switch]: SwitchIcon,
  97. [Operator.WenCai]: WenCaiIcon,
  98. [Operator.AkShare]: AkShareIcon,
  99. [Operator.YahooFinance]: YahooFinanceIcon,
  100. [Operator.Jin10]: Jin10Icon,
  101. [Operator.Concentrator]: ConcentratorIcon,
  102. [Operator.TuShare]: TuShareIcon,
  103. [Operator.Note]: NoteIcon,
  104. };
  105. export const operatorMap: Record<
  106. Operator,
  107. {
  108. backgroundColor?: string;
  109. color?: string;
  110. width?: number;
  111. height?: number;
  112. fontSize?: number;
  113. iconFontSize?: number;
  114. iconWidth?: number;
  115. moreIconColor?: string;
  116. }
  117. > = {
  118. [Operator.Retrieval]: {
  119. backgroundColor: '#cad6e0',
  120. color: '#385974',
  121. },
  122. [Operator.Generate]: {
  123. backgroundColor: '#ebd6d6',
  124. width: 150,
  125. height: 150,
  126. fontSize: 20,
  127. iconFontSize: 30,
  128. color: '#996464',
  129. },
  130. [Operator.Answer]: {
  131. backgroundColor: '#f4816d',
  132. color: 'white',
  133. },
  134. [Operator.Begin]: {
  135. backgroundColor: '#4f51d6',
  136. },
  137. [Operator.Categorize]: {
  138. backgroundColor: '#ffebcd',
  139. color: '#cc8a26',
  140. },
  141. [Operator.Message]: {
  142. backgroundColor: '#c5ddc7',
  143. color: 'green',
  144. },
  145. [Operator.Relevant]: {
  146. backgroundColor: '#9fd94d',
  147. color: 'white',
  148. width: 70,
  149. height: 70,
  150. fontSize: 12,
  151. iconFontSize: 16,
  152. },
  153. [Operator.RewriteQuestion]: {
  154. backgroundColor: '#f8c7f8',
  155. color: 'white',
  156. width: 70,
  157. height: 70,
  158. fontSize: 12,
  159. iconFontSize: 16,
  160. },
  161. [Operator.KeywordExtract]: {
  162. width: 70,
  163. height: 70,
  164. backgroundColor: '#0f0e0f',
  165. color: '#e1dcdc',
  166. fontSize: 12,
  167. iconWidth: 16,
  168. // iconFontSize: 16,
  169. },
  170. [Operator.DuckDuckGo]: {
  171. backgroundColor: '#e7e389',
  172. color: '#aea00c',
  173. },
  174. [Operator.Baidu]: {
  175. backgroundColor: '#d9e0f8',
  176. },
  177. [Operator.Wikipedia]: {
  178. backgroundColor: '#dee0e2',
  179. },
  180. [Operator.PubMed]: {
  181. backgroundColor: '#a2ccf0',
  182. },
  183. [Operator.ArXiv]: {
  184. width: 70,
  185. height: 70,
  186. fontSize: 12,
  187. iconWidth: 16,
  188. iconFontSize: 16,
  189. moreIconColor: 'white',
  190. backgroundColor: '#b31b1b',
  191. color: 'white',
  192. },
  193. [Operator.Google]: {
  194. backgroundColor: 'pink',
  195. },
  196. [Operator.Bing]: {
  197. backgroundColor: '#c0dcc4',
  198. },
  199. [Operator.GoogleScholar]: {
  200. backgroundColor: '#b4e4f6',
  201. },
  202. [Operator.DeepL]: {
  203. backgroundColor: '#f5e8e6',
  204. },
  205. [Operator.GitHub]: {
  206. backgroundColor: '#c7c7f8',
  207. },
  208. [Operator.BaiduFanyi]: { backgroundColor: '#e5f2d3' },
  209. [Operator.QWeather]: { backgroundColor: '#a4bbf3' },
  210. [Operator.ExeSQL]: { backgroundColor: '#b9efe8' },
  211. [Operator.Switch]: { backgroundColor: '#dbaff6' },
  212. [Operator.WenCai]: { backgroundColor: '#faac5b' },
  213. [Operator.AkShare]: { backgroundColor: '#8085f5' },
  214. [Operator.YahooFinance]: { backgroundColor: '#b474ff' },
  215. [Operator.Jin10]: { backgroundColor: '#a0b9f8' },
  216. [Operator.Concentrator]: {
  217. backgroundColor: '#32d2a3',
  218. color: 'white',
  219. width: 70,
  220. height: 70,
  221. fontSize: 10,
  222. iconFontSize: 16,
  223. },
  224. [Operator.TuShare]: { backgroundColor: '#f8cfa0' },
  225. [Operator.Note]: { backgroundColor: '#f8cfa0' },
  226. };
  227. export const componentMenuList = [
  228. {
  229. name: Operator.Retrieval,
  230. },
  231. {
  232. name: Operator.Generate,
  233. },
  234. {
  235. name: Operator.Answer,
  236. },
  237. {
  238. name: Operator.Categorize,
  239. },
  240. {
  241. name: Operator.Message,
  242. },
  243. {
  244. name: Operator.Relevant,
  245. },
  246. {
  247. name: Operator.RewriteQuestion,
  248. },
  249. {
  250. name: Operator.KeywordExtract,
  251. },
  252. {
  253. name: Operator.Switch,
  254. },
  255. {
  256. name: Operator.Concentrator,
  257. },
  258. {
  259. name: Operator.Note,
  260. },
  261. {
  262. name: Operator.DuckDuckGo,
  263. },
  264. {
  265. name: Operator.Baidu,
  266. },
  267. {
  268. name: Operator.Wikipedia,
  269. },
  270. {
  271. name: Operator.PubMed,
  272. },
  273. {
  274. name: Operator.ArXiv,
  275. },
  276. {
  277. name: Operator.Google,
  278. },
  279. {
  280. name: Operator.Bing,
  281. },
  282. {
  283. name: Operator.GoogleScholar,
  284. },
  285. {
  286. name: Operator.DeepL,
  287. },
  288. {
  289. name: Operator.GitHub,
  290. },
  291. {
  292. name: Operator.BaiduFanyi,
  293. },
  294. {
  295. name: Operator.QWeather,
  296. },
  297. {
  298. name: Operator.ExeSQL,
  299. },
  300. {
  301. name: Operator.WenCai,
  302. },
  303. {
  304. name: Operator.AkShare,
  305. },
  306. {
  307. name: Operator.YahooFinance,
  308. },
  309. {
  310. name: Operator.Jin10,
  311. },
  312. {
  313. name: Operator.TuShare,
  314. },
  315. ];
  316. export const initialRetrievalValues = {
  317. similarity_threshold: 0.2,
  318. keywords_similarity_weight: 0.3,
  319. top_n: 8,
  320. };
  321. export const initialBeginValues = {
  322. prologue: `Hi! I'm your assistant, what can I do for you?`,
  323. };
  324. export const variableCheckBoxFieldMap = Object.keys(
  325. variableEnabledFieldMap,
  326. ).reduce<Record<string, boolean>>((pre, cur) => {
  327. pre[cur] = true;
  328. return pre;
  329. }, {});
  330. const initialLlmBaseValues = {
  331. ...variableCheckBoxFieldMap,
  332. temperature: 0.1,
  333. top_p: 0.3,
  334. frequency_penalty: 0.7,
  335. presence_penalty: 0.4,
  336. max_tokens: 256,
  337. };
  338. export const initialGenerateValues = {
  339. ...initialLlmBaseValues,
  340. prompt: i18n.t('flow.promptText'),
  341. cite: true,
  342. message_history_window_size: 12,
  343. parameters: [],
  344. };
  345. export const initialRewriteQuestionValues = {
  346. ...initialLlmBaseValues,
  347. loop: 1,
  348. };
  349. export const initialRelevantValues = {
  350. ...initialLlmBaseValues,
  351. };
  352. export const initialCategorizeValues = {
  353. ...initialLlmBaseValues,
  354. category_description: {},
  355. };
  356. export const initialMessageValues = {
  357. messages: [],
  358. };
  359. export const initialKeywordExtractValues = {
  360. ...initialLlmBaseValues,
  361. top_n: 1,
  362. };
  363. export const initialDuckValues = {
  364. top_n: 10,
  365. channel: Channel.Text,
  366. };
  367. export const initialBaiduValues = {
  368. top_n: 10,
  369. };
  370. export const initialWikipediaValues = {
  371. top_n: 10,
  372. language: 'en',
  373. };
  374. export const initialPubMedValues = {
  375. top_n: 10,
  376. email: '',
  377. };
  378. export const initialArXivValues = {
  379. top_n: 10,
  380. sort_by: 'relevance',
  381. };
  382. export const initialGoogleValues = {
  383. top_n: 10,
  384. api_key: 'Xxx(get from https://serpapi.com/manage-api-key)',
  385. country: 'cn',
  386. language: 'en',
  387. };
  388. export const initialBingValues = {
  389. top_n: 10,
  390. channel: 'Webpages',
  391. api_key:
  392. '"YOUR_ACCESS_KEY"(get from https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)',
  393. country: 'CH',
  394. language: 'en',
  395. };
  396. export const initialGoogleScholarValues = {
  397. top_n: 5,
  398. sort_by: 'relevance',
  399. patents: true,
  400. };
  401. export const initialDeepLValues = {
  402. top_n: 5,
  403. auth_key: 'relevance',
  404. };
  405. export const initialGithubValues = {
  406. top_n: 5,
  407. };
  408. export const initialBaiduFanyiValues = {
  409. appid: 'xxx',
  410. secret_key: 'xxx',
  411. trans_type: 'translate',
  412. };
  413. export const initialQWeatherValues = {
  414. web_apikey: 'xxx',
  415. type: 'weather',
  416. user_type: 'free',
  417. time_period: 'now',
  418. };
  419. export const initialExeSqlValues = {
  420. db_type: 'mysql',
  421. database: '',
  422. username: '',
  423. host: '',
  424. port: 3306,
  425. password: '',
  426. loop: 3,
  427. top_n: 30,
  428. };
  429. export const initialSwitchValues = { conditions: [] };
  430. export const initialWenCaiValues = { top_n: 20, query_type: 'stock' };
  431. export const initialAkShareValues = { top_n: 10 };
  432. export const initialYahooFinanceValues = {
  433. info: true,
  434. history: false,
  435. financials: false,
  436. balance_sheet: false,
  437. cash_flow_statement: false,
  438. news: true,
  439. };
  440. export const initialJin10Values = {
  441. type: 'flash',
  442. secret_key: 'xxx',
  443. flash_type: '1',
  444. contain: '',
  445. filter: '',
  446. };
  447. export const initialConcentratorValues = {};
  448. export const initialTuShareValues = {
  449. token: 'xxx',
  450. src: 'eastmoney',
  451. start_date: '2024-01-01 09:00:00',
  452. };
  453. export const initialNoteValues = {
  454. text: '',
  455. };
  456. export const CategorizeAnchorPointPositions = [
  457. { top: 1, right: 34 },
  458. { top: 8, right: 18 },
  459. { top: 15, right: 10 },
  460. { top: 24, right: 4 },
  461. { top: 31, right: 1 },
  462. { top: 38, right: -2 },
  463. { top: 62, right: -2 }, //bottom
  464. { top: 71, right: 1 },
  465. { top: 79, right: 6 },
  466. { top: 86, right: 12 },
  467. { top: 91, right: 20 },
  468. { top: 98, right: 34 },
  469. ];
  470. // key is the source of the edge, value is the target of the edge
  471. // no connection lines are allowed between key and value
  472. export const RestrictedUpstreamMap = {
  473. [Operator.Begin]: [Operator.Relevant],
  474. [Operator.Categorize]: [
  475. Operator.Begin,
  476. Operator.Categorize,
  477. Operator.Answer,
  478. Operator.Relevant,
  479. ],
  480. [Operator.Answer]: [
  481. Operator.Begin,
  482. Operator.Answer,
  483. Operator.Message,
  484. Operator.Relevant,
  485. ],
  486. [Operator.Retrieval]: [Operator.Begin, Operator.Retrieval],
  487. [Operator.Generate]: [Operator.Begin, Operator.Relevant],
  488. [Operator.Message]: [
  489. Operator.Begin,
  490. Operator.Message,
  491. Operator.Generate,
  492. Operator.Retrieval,
  493. Operator.RewriteQuestion,
  494. Operator.Categorize,
  495. Operator.Relevant,
  496. ],
  497. [Operator.Relevant]: [Operator.Begin, Operator.Answer, Operator.Relevant],
  498. [Operator.RewriteQuestion]: [
  499. Operator.Begin,
  500. Operator.Message,
  501. Operator.Generate,
  502. Operator.RewriteQuestion,
  503. Operator.Categorize,
  504. Operator.Relevant,
  505. ],
  506. [Operator.KeywordExtract]: [
  507. Operator.Begin,
  508. Operator.Message,
  509. Operator.Relevant,
  510. ],
  511. [Operator.Baidu]: [Operator.Begin, Operator.Retrieval],
  512. [Operator.DuckDuckGo]: [Operator.Begin, Operator.Retrieval],
  513. [Operator.Wikipedia]: [Operator.Begin, Operator.Retrieval],
  514. [Operator.PubMed]: [Operator.Begin, Operator.Retrieval],
  515. [Operator.ArXiv]: [Operator.Begin, Operator.Retrieval],
  516. [Operator.Google]: [Operator.Begin, Operator.Retrieval],
  517. [Operator.Bing]: [Operator.Begin, Operator.Retrieval],
  518. [Operator.GoogleScholar]: [Operator.Begin, Operator.Retrieval],
  519. [Operator.DeepL]: [Operator.Begin, Operator.Retrieval],
  520. [Operator.GitHub]: [Operator.Begin, Operator.Retrieval],
  521. [Operator.BaiduFanyi]: [Operator.Begin, Operator.Retrieval],
  522. [Operator.QWeather]: [Operator.Begin, Operator.Retrieval],
  523. [Operator.ExeSQL]: [Operator.Begin],
  524. [Operator.Switch]: [Operator.Begin],
  525. [Operator.WenCai]: [Operator.Begin],
  526. [Operator.AkShare]: [Operator.Begin],
  527. [Operator.YahooFinance]: [Operator.Begin],
  528. [Operator.Jin10]: [Operator.Begin],
  529. [Operator.Concentrator]: [Operator.Begin],
  530. [Operator.TuShare]: [Operator.Begin],
  531. };
  532. export const NodeMap = {
  533. [Operator.Begin]: 'beginNode',
  534. [Operator.Categorize]: 'categorizeNode',
  535. [Operator.Retrieval]: 'logicNode',
  536. [Operator.Generate]: 'logicNode',
  537. [Operator.Answer]: 'logicNode',
  538. [Operator.Message]: 'logicNode',
  539. [Operator.Relevant]: 'relevantNode',
  540. [Operator.RewriteQuestion]: 'logicNode',
  541. [Operator.KeywordExtract]: 'logicNode',
  542. [Operator.DuckDuckGo]: 'ragNode',
  543. [Operator.Baidu]: 'ragNode',
  544. [Operator.Wikipedia]: 'ragNode',
  545. [Operator.PubMed]: 'ragNode',
  546. [Operator.ArXiv]: 'ragNode',
  547. [Operator.Google]: 'ragNode',
  548. [Operator.Bing]: 'ragNode',
  549. [Operator.GoogleScholar]: 'ragNode',
  550. [Operator.DeepL]: 'ragNode',
  551. [Operator.GitHub]: 'ragNode',
  552. [Operator.BaiduFanyi]: 'ragNode',
  553. [Operator.QWeather]: 'ragNode',
  554. [Operator.ExeSQL]: 'ragNode',
  555. [Operator.Switch]: 'categorizeNode',
  556. [Operator.Concentrator]: 'logicNode',
  557. [Operator.WenCai]: 'ragNode',
  558. [Operator.AkShare]: 'ragNode',
  559. [Operator.YahooFinance]: 'ragNode',
  560. [Operator.Jin10]: 'ragNode',
  561. [Operator.TuShare]: 'ragNode',
  562. [Operator.Note]: 'noteNode',
  563. };
  564. export const LanguageOptions = [
  565. {
  566. value: 'af',
  567. label: 'Afrikaans',
  568. },
  569. {
  570. value: 'pl',
  571. label: 'Polski',
  572. },
  573. {
  574. value: 'ar',
  575. label: 'العربية',
  576. },
  577. {
  578. value: 'ast',
  579. label: 'Asturianu',
  580. },
  581. {
  582. value: 'az',
  583. label: 'Azərbaycanca',
  584. },
  585. {
  586. value: 'bg',
  587. label: 'Български',
  588. },
  589. {
  590. value: 'nan',
  591. label: '閩南語 / Bân-lâm-gú',
  592. },
  593. {
  594. value: 'bn',
  595. label: 'বাংলা',
  596. },
  597. {
  598. value: 'be',
  599. label: 'Беларуская',
  600. },
  601. {
  602. value: 'ca',
  603. label: 'Català',
  604. },
  605. {
  606. value: 'cs',
  607. label: 'Čeština',
  608. },
  609. {
  610. value: 'cy',
  611. label: 'Cymraeg',
  612. },
  613. {
  614. value: 'da',
  615. label: 'Dansk',
  616. },
  617. {
  618. value: 'de',
  619. label: 'Deutsch',
  620. },
  621. {
  622. value: 'et',
  623. label: 'Eesti',
  624. },
  625. {
  626. value: 'el',
  627. label: 'Ελληνικά',
  628. },
  629. {
  630. value: 'en',
  631. label: 'English',
  632. },
  633. {
  634. value: 'es',
  635. label: 'Español',
  636. },
  637. {
  638. value: 'eo',
  639. label: 'Esperanto',
  640. },
  641. {
  642. value: 'eu',
  643. label: 'Euskara',
  644. },
  645. {
  646. value: 'fa',
  647. label: 'فارسی',
  648. },
  649. {
  650. value: 'fr',
  651. label: 'Français',
  652. },
  653. {
  654. value: 'gl',
  655. label: 'Galego',
  656. },
  657. {
  658. value: 'ko',
  659. label: '한국어',
  660. },
  661. {
  662. value: 'hy',
  663. label: 'Հայերեն',
  664. },
  665. {
  666. value: 'hi',
  667. label: 'हिन्दी',
  668. },
  669. {
  670. value: 'hr',
  671. label: 'Hrvatski',
  672. },
  673. {
  674. value: 'id',
  675. label: 'Bahasa Indonesia',
  676. },
  677. {
  678. value: 'it',
  679. label: 'Italiano',
  680. },
  681. {
  682. value: 'he',
  683. label: 'עברית',
  684. },
  685. {
  686. value: 'ka',
  687. label: 'ქართული',
  688. },
  689. {
  690. value: 'lld',
  691. label: 'Ladin',
  692. },
  693. {
  694. value: 'la',
  695. label: 'Latina',
  696. },
  697. {
  698. value: 'lv',
  699. label: 'Latviešu',
  700. },
  701. {
  702. value: 'lt',
  703. label: 'Lietuvių',
  704. },
  705. {
  706. value: 'hu',
  707. label: 'Magyar',
  708. },
  709. {
  710. value: 'mk',
  711. label: 'Македонски',
  712. },
  713. {
  714. value: 'arz',
  715. label: 'مصرى',
  716. },
  717. {
  718. value: 'ms',
  719. label: 'Bahasa Melayu',
  720. },
  721. {
  722. value: 'min',
  723. label: 'Bahaso Minangkabau',
  724. },
  725. {
  726. value: 'my',
  727. label: 'မြန်မာဘာသာ',
  728. },
  729. {
  730. value: 'nl',
  731. label: 'Nederlands',
  732. },
  733. {
  734. value: 'ja',
  735. label: '日本語',
  736. },
  737. {
  738. value: 'no',
  739. label: 'Norsk (bokmål)',
  740. },
  741. {
  742. value: 'nn',
  743. label: 'Norsk (nynorsk)',
  744. },
  745. {
  746. value: 'ce',
  747. label: 'Нохчийн',
  748. },
  749. {
  750. value: 'uz',
  751. label: 'Oʻzbekcha / Ўзбекча',
  752. },
  753. {
  754. value: 'pt',
  755. label: 'Português',
  756. },
  757. {
  758. value: 'kk',
  759. label: 'Қазақша / Qazaqşa / قازاقشا',
  760. },
  761. {
  762. value: 'ro',
  763. label: 'Română',
  764. },
  765. {
  766. value: 'ru',
  767. label: 'Русский',
  768. },
  769. {
  770. value: 'ceb',
  771. label: 'Sinugboanong Binisaya',
  772. },
  773. {
  774. value: 'sk',
  775. label: 'Slovenčina',
  776. },
  777. {
  778. value: 'sl',
  779. label: 'Slovenščina',
  780. },
  781. {
  782. value: 'sr',
  783. label: 'Српски / Srpski',
  784. },
  785. {
  786. value: 'sh',
  787. label: 'Srpskohrvatski / Српскохрватски',
  788. },
  789. {
  790. value: 'fi',
  791. label: 'Suomi',
  792. },
  793. {
  794. value: 'sv',
  795. label: 'Svenska',
  796. },
  797. {
  798. value: 'ta',
  799. label: 'தமிழ்',
  800. },
  801. {
  802. value: 'tt',
  803. label: 'Татарча / Tatarça',
  804. },
  805. {
  806. value: 'th',
  807. label: 'ภาษาไทย',
  808. },
  809. {
  810. value: 'tg',
  811. label: 'Тоҷикӣ',
  812. },
  813. {
  814. value: 'azb',
  815. label: 'تۆرکجه',
  816. },
  817. {
  818. value: 'tr',
  819. label: 'Türkçe',
  820. },
  821. {
  822. value: 'uk',
  823. label: 'Українська',
  824. },
  825. {
  826. value: 'ur',
  827. label: 'اردو',
  828. },
  829. {
  830. value: 'vi',
  831. label: 'Tiếng Việt',
  832. },
  833. {
  834. value: 'war',
  835. label: 'Winaray',
  836. },
  837. {
  838. value: 'zh',
  839. label: '中文',
  840. },
  841. {
  842. value: 'yue',
  843. label: '粵語',
  844. },
  845. ];
  846. export const GoogleLanguageOptions = [
  847. {
  848. language_code: 'af',
  849. language_name: 'Afrikaans',
  850. },
  851. {
  852. language_code: 'ak',
  853. language_name: 'Akan',
  854. },
  855. {
  856. language_code: 'sq',
  857. language_name: 'Albanian',
  858. },
  859. {
  860. language_code: 'ws',
  861. language_name: 'Samoa',
  862. },
  863. {
  864. language_code: 'am',
  865. language_name: 'Amharic',
  866. },
  867. {
  868. language_code: 'ar',
  869. language_name: 'Arabic',
  870. },
  871. {
  872. language_code: 'hy',
  873. language_name: 'Armenian',
  874. },
  875. {
  876. language_code: 'az',
  877. language_name: 'Azerbaijani',
  878. },
  879. {
  880. language_code: 'eu',
  881. language_name: 'Basque',
  882. },
  883. {
  884. language_code: 'be',
  885. language_name: 'Belarusian',
  886. },
  887. {
  888. language_code: 'bem',
  889. language_name: 'Bemba',
  890. },
  891. {
  892. language_code: 'bn',
  893. language_name: 'Bengali',
  894. },
  895. {
  896. language_code: 'bh',
  897. language_name: 'Bihari',
  898. },
  899. {
  900. language_code: 'xx-bork',
  901. language_name: 'Bork, bork, bork!',
  902. },
  903. {
  904. language_code: 'bs',
  905. language_name: 'Bosnian',
  906. },
  907. {
  908. language_code: 'br',
  909. language_name: 'Breton',
  910. },
  911. {
  912. language_code: 'bg',
  913. language_name: 'Bulgarian',
  914. },
  915. {
  916. language_code: 'bt',
  917. language_name: 'Bhutanese',
  918. },
  919. {
  920. language_code: 'km',
  921. language_name: 'Cambodian',
  922. },
  923. {
  924. language_code: 'ca',
  925. language_name: 'Catalan',
  926. },
  927. {
  928. language_code: 'chr',
  929. language_name: 'Cherokee',
  930. },
  931. {
  932. language_code: 'ny',
  933. language_name: 'Chichewa',
  934. },
  935. {
  936. language_code: 'zh-cn',
  937. language_name: 'Chinese (Simplified)',
  938. },
  939. {
  940. language_code: 'zh-tw',
  941. language_name: 'Chinese (Traditional)',
  942. },
  943. {
  944. language_code: 'co',
  945. language_name: 'Corsican',
  946. },
  947. {
  948. language_code: 'hr',
  949. language_name: 'Croatian',
  950. },
  951. {
  952. language_code: 'cs',
  953. language_name: 'Czech',
  954. },
  955. {
  956. language_code: 'da',
  957. language_name: 'Danish',
  958. },
  959. {
  960. language_code: 'nl',
  961. language_name: 'Dutch',
  962. },
  963. {
  964. language_code: 'xx-elmer',
  965. language_name: 'Elmer Fudd',
  966. },
  967. {
  968. language_code: 'en',
  969. language_name: 'English',
  970. },
  971. {
  972. language_code: 'eo',
  973. language_name: 'Esperanto',
  974. },
  975. {
  976. language_code: 'et',
  977. language_name: 'Estonian',
  978. },
  979. {
  980. language_code: 'ee',
  981. language_name: 'Ewe',
  982. },
  983. {
  984. language_code: 'fo',
  985. language_name: 'Faroese',
  986. },
  987. {
  988. language_code: 'tl',
  989. language_name: 'Filipino',
  990. },
  991. {
  992. language_code: 'fi',
  993. language_name: 'Finnish',
  994. },
  995. {
  996. language_code: 'fr',
  997. language_name: 'French',
  998. },
  999. {
  1000. language_code: 'fy',
  1001. language_name: 'Frisian',
  1002. },
  1003. {
  1004. language_code: 'gaa',
  1005. language_name: 'Ga',
  1006. },
  1007. {
  1008. language_code: 'gl',
  1009. language_name: 'Galician',
  1010. },
  1011. {
  1012. language_code: 'ka',
  1013. language_name: 'Georgian',
  1014. },
  1015. {
  1016. language_code: 'de',
  1017. language_name: 'German',
  1018. },
  1019. {
  1020. language_code: 'el',
  1021. language_name: 'Greek',
  1022. },
  1023. {
  1024. language_code: 'kl',
  1025. language_name: 'Greenlandic',
  1026. },
  1027. {
  1028. language_code: 'gn',
  1029. language_name: 'Guarani',
  1030. },
  1031. {
  1032. language_code: 'gu',
  1033. language_name: 'Gujarati',
  1034. },
  1035. {
  1036. language_code: 'xx-hacker',
  1037. language_name: 'Hacker',
  1038. },
  1039. {
  1040. language_code: 'ht',
  1041. language_name: 'Haitian Creole',
  1042. },
  1043. {
  1044. language_code: 'ha',
  1045. language_name: 'Hausa',
  1046. },
  1047. {
  1048. language_code: 'haw',
  1049. language_name: 'Hawaiian',
  1050. },
  1051. {
  1052. language_code: 'iw',
  1053. language_name: 'Hebrew',
  1054. },
  1055. {
  1056. language_code: 'hi',
  1057. language_name: 'Hindi',
  1058. },
  1059. {
  1060. language_code: 'hu',
  1061. language_name: 'Hungarian',
  1062. },
  1063. {
  1064. language_code: 'is',
  1065. language_name: 'Icelandic',
  1066. },
  1067. {
  1068. language_code: 'ig',
  1069. language_name: 'Igbo',
  1070. },
  1071. {
  1072. language_code: 'id',
  1073. language_name: 'Indonesian',
  1074. },
  1075. {
  1076. language_code: 'ia',
  1077. language_name: 'Interlingua',
  1078. },
  1079. {
  1080. language_code: 'ga',
  1081. language_name: 'Irish',
  1082. },
  1083. {
  1084. language_code: 'it',
  1085. language_name: 'Italian',
  1086. },
  1087. {
  1088. language_code: 'ja',
  1089. language_name: 'Japanese',
  1090. },
  1091. {
  1092. language_code: 'jw',
  1093. language_name: 'Javanese',
  1094. },
  1095. {
  1096. language_code: 'kn',
  1097. language_name: 'Kannada',
  1098. },
  1099. {
  1100. language_code: 'kk',
  1101. language_name: 'Kazakh',
  1102. },
  1103. {
  1104. language_code: 'rw',
  1105. language_name: 'Kinyarwanda',
  1106. },
  1107. {
  1108. language_code: 'rn',
  1109. language_name: 'Kirundi',
  1110. },
  1111. {
  1112. language_code: 'xx-klingon',
  1113. language_name: 'Klingon',
  1114. },
  1115. {
  1116. language_code: 'kg',
  1117. language_name: 'Kongo',
  1118. },
  1119. {
  1120. language_code: 'ko',
  1121. language_name: 'Korean',
  1122. },
  1123. {
  1124. language_code: 'kri',
  1125. language_name: 'Krio (Sierra Leone)',
  1126. },
  1127. {
  1128. language_code: 'ku',
  1129. language_name: 'Kurdish',
  1130. },
  1131. {
  1132. language_code: 'ckb',
  1133. language_name: 'Kurdish (Soranî)',
  1134. },
  1135. {
  1136. language_code: 'ky',
  1137. language_name: 'Kyrgyz',
  1138. },
  1139. {
  1140. language_code: 'lo',
  1141. language_name: 'Laothian',
  1142. },
  1143. {
  1144. language_code: 'la',
  1145. language_name: 'Latin',
  1146. },
  1147. {
  1148. language_code: 'lv',
  1149. language_name: 'Latvian',
  1150. },
  1151. {
  1152. language_code: 'ln',
  1153. language_name: 'Lingala',
  1154. },
  1155. {
  1156. language_code: 'lt',
  1157. language_name: 'Lithuanian',
  1158. },
  1159. {
  1160. language_code: 'loz',
  1161. language_name: 'Lozi',
  1162. },
  1163. {
  1164. language_code: 'lg',
  1165. language_name: 'Luganda',
  1166. },
  1167. {
  1168. language_code: 'ach',
  1169. language_name: 'Luo',
  1170. },
  1171. {
  1172. language_code: 'mk',
  1173. language_name: 'Macedonian',
  1174. },
  1175. {
  1176. language_code: 'mg',
  1177. language_name: 'Malagasy',
  1178. },
  1179. {
  1180. language_code: 'ms',
  1181. language_name: 'Malay',
  1182. },
  1183. {
  1184. language_code: 'ml',
  1185. language_name: 'Malayalam',
  1186. },
  1187. {
  1188. language_code: 'mt',
  1189. language_name: 'Maltese',
  1190. },
  1191. {
  1192. language_code: 'mv',
  1193. language_name: 'Maldives',
  1194. },
  1195. {
  1196. language_code: 'mi',
  1197. language_name: 'Maori',
  1198. },
  1199. {
  1200. language_code: 'mr',
  1201. language_name: 'Marathi',
  1202. },
  1203. {
  1204. language_code: 'mfe',
  1205. language_name: 'Mauritian Creole',
  1206. },
  1207. {
  1208. language_code: 'mo',
  1209. language_name: 'Moldavian',
  1210. },
  1211. {
  1212. language_code: 'mn',
  1213. language_name: 'Mongolian',
  1214. },
  1215. {
  1216. language_code: 'sr-me',
  1217. language_name: 'Montenegrin',
  1218. },
  1219. {
  1220. language_code: 'my',
  1221. language_name: 'Myanmar',
  1222. },
  1223. {
  1224. language_code: 'ne',
  1225. language_name: 'Nepali',
  1226. },
  1227. {
  1228. language_code: 'pcm',
  1229. language_name: 'Nigerian Pidgin',
  1230. },
  1231. {
  1232. language_code: 'nso',
  1233. language_name: 'Northern Sotho',
  1234. },
  1235. {
  1236. language_code: 'no',
  1237. language_name: 'Norwegian',
  1238. },
  1239. {
  1240. language_code: 'nn',
  1241. language_name: 'Norwegian (Nynorsk)',
  1242. },
  1243. {
  1244. language_code: 'oc',
  1245. language_name: 'Occitan',
  1246. },
  1247. {
  1248. language_code: 'or',
  1249. language_name: 'Oriya',
  1250. },
  1251. {
  1252. language_code: 'om',
  1253. language_name: 'Oromo',
  1254. },
  1255. {
  1256. language_code: 'ps',
  1257. language_name: 'Pashto',
  1258. },
  1259. {
  1260. language_code: 'fa',
  1261. language_name: 'Persian',
  1262. },
  1263. {
  1264. language_code: 'xx-pirate',
  1265. language_name: 'Pirate',
  1266. },
  1267. {
  1268. language_code: 'pl',
  1269. language_name: 'Polish',
  1270. },
  1271. {
  1272. language_code: 'pt',
  1273. language_name: 'Portuguese',
  1274. },
  1275. {
  1276. language_code: 'pt-br',
  1277. language_name: 'Portuguese (Brazil)',
  1278. },
  1279. {
  1280. language_code: 'pt-pt',
  1281. language_name: 'Portuguese (Portugal)',
  1282. },
  1283. {
  1284. language_code: 'pa',
  1285. language_name: 'Punjabi',
  1286. },
  1287. {
  1288. language_code: 'qu',
  1289. language_name: 'Quechua',
  1290. },
  1291. {
  1292. language_code: 'ro',
  1293. language_name: 'Romanian',
  1294. },
  1295. {
  1296. language_code: 'rm',
  1297. language_name: 'Romansh',
  1298. },
  1299. {
  1300. language_code: 'nyn',
  1301. language_name: 'Runyakitara',
  1302. },
  1303. {
  1304. language_code: 'ru',
  1305. language_name: 'Russian',
  1306. },
  1307. {
  1308. language_code: 'gd',
  1309. language_name: 'Scots Gaelic',
  1310. },
  1311. {
  1312. language_code: 'sr',
  1313. language_name: 'Serbian',
  1314. },
  1315. {
  1316. language_code: 'sh',
  1317. language_name: 'Serbo-Croatian',
  1318. },
  1319. {
  1320. language_code: 'st',
  1321. language_name: 'Sesotho',
  1322. },
  1323. {
  1324. language_code: 'tn',
  1325. language_name: 'Setswana',
  1326. },
  1327. {
  1328. language_code: 'crs',
  1329. language_name: 'Seychellois Creole',
  1330. },
  1331. {
  1332. language_code: 'sn',
  1333. language_name: 'Shona',
  1334. },
  1335. {
  1336. language_code: 'sd',
  1337. language_name: 'Sindhi',
  1338. },
  1339. {
  1340. language_code: 'si',
  1341. language_name: 'Sinhalese',
  1342. },
  1343. {
  1344. language_code: 'sk',
  1345. language_name: 'Slovak',
  1346. },
  1347. {
  1348. language_code: 'sl',
  1349. language_name: 'Slovenian',
  1350. },
  1351. {
  1352. language_code: 'so',
  1353. language_name: 'Somali',
  1354. },
  1355. {
  1356. language_code: 'es',
  1357. language_name: 'Spanish',
  1358. },
  1359. {
  1360. language_code: 'es-419',
  1361. language_name: 'Spanish (Latin American)',
  1362. },
  1363. {
  1364. language_code: 'su',
  1365. language_name: 'Sundanese',
  1366. },
  1367. {
  1368. language_code: 'sw',
  1369. language_name: 'Swahili',
  1370. },
  1371. {
  1372. language_code: 'sv',
  1373. language_name: 'Swedish',
  1374. },
  1375. {
  1376. language_code: 'tg',
  1377. language_name: 'Tajik',
  1378. },
  1379. {
  1380. language_code: 'ta',
  1381. language_name: 'Tamil',
  1382. },
  1383. {
  1384. language_code: 'tt',
  1385. language_name: 'Tatar',
  1386. },
  1387. {
  1388. language_code: 'te',
  1389. language_name: 'Telugu',
  1390. },
  1391. {
  1392. language_code: 'th',
  1393. language_name: 'Thai',
  1394. },
  1395. {
  1396. language_code: 'ti',
  1397. language_name: 'Tigrinya',
  1398. },
  1399. {
  1400. language_code: 'to',
  1401. language_name: 'Tonga',
  1402. },
  1403. {
  1404. language_code: 'lua',
  1405. language_name: 'Tshiluba',
  1406. },
  1407. {
  1408. language_code: 'tum',
  1409. language_name: 'Tumbuka',
  1410. },
  1411. {
  1412. language_code: 'tr',
  1413. language_name: 'Turkish',
  1414. },
  1415. {
  1416. language_code: 'tk',
  1417. language_name: 'Turkmen',
  1418. },
  1419. {
  1420. language_code: 'tw',
  1421. language_name: 'Twi',
  1422. },
  1423. {
  1424. language_code: 'ug',
  1425. language_name: 'Uighur',
  1426. },
  1427. {
  1428. language_code: 'uk',
  1429. language_name: 'Ukrainian',
  1430. },
  1431. {
  1432. language_code: 'ur',
  1433. language_name: 'Urdu',
  1434. },
  1435. {
  1436. language_code: 'uz',
  1437. language_name: 'Uzbek',
  1438. },
  1439. {
  1440. language_code: 'vu',
  1441. language_name: 'Vanuatu',
  1442. },
  1443. {
  1444. language_code: 'vi',
  1445. language_name: 'Vietnamese',
  1446. },
  1447. {
  1448. language_code: 'cy',
  1449. language_name: 'Welsh',
  1450. },
  1451. {
  1452. language_code: 'wo',
  1453. language_name: 'Wolof',
  1454. },
  1455. {
  1456. language_code: 'xh',
  1457. language_name: 'Xhosa',
  1458. },
  1459. {
  1460. language_code: 'yi',
  1461. language_name: 'Yiddish',
  1462. },
  1463. {
  1464. language_code: 'yo',
  1465. language_name: 'Yoruba',
  1466. },
  1467. {
  1468. language_code: 'zu',
  1469. language_name: 'Zulu',
  1470. },
  1471. ].map((x) => ({ label: x.language_name, value: x.language_code }));
  1472. export const GoogleCountryOptions = [
  1473. {
  1474. country_code: 'af',
  1475. country_name: 'Afghanistan',
  1476. },
  1477. {
  1478. country_code: 'al',
  1479. country_name: 'Albania',
  1480. },
  1481. {
  1482. country_code: 'dz',
  1483. country_name: 'Algeria',
  1484. },
  1485. {
  1486. country_code: 'as',
  1487. country_name: 'American Samoa',
  1488. },
  1489. {
  1490. country_code: 'ad',
  1491. country_name: 'Andorra',
  1492. },
  1493. {
  1494. country_code: 'ao',
  1495. country_name: 'Angola',
  1496. },
  1497. {
  1498. country_code: 'ai',
  1499. country_name: 'Anguilla',
  1500. },
  1501. {
  1502. country_code: 'aq',
  1503. country_name: 'Antarctica',
  1504. },
  1505. {
  1506. country_code: 'ag',
  1507. country_name: 'Antigua and Barbuda',
  1508. },
  1509. {
  1510. country_code: 'ar',
  1511. country_name: 'Argentina',
  1512. },
  1513. {
  1514. country_code: 'am',
  1515. country_name: 'Armenia',
  1516. },
  1517. {
  1518. country_code: 'aw',
  1519. country_name: 'Aruba',
  1520. },
  1521. {
  1522. country_code: 'au',
  1523. country_name: 'Australia',
  1524. },
  1525. {
  1526. country_code: 'at',
  1527. country_name: 'Austria',
  1528. },
  1529. {
  1530. country_code: 'az',
  1531. country_name: 'Azerbaijan',
  1532. },
  1533. {
  1534. country_code: 'bs',
  1535. country_name: 'Bahamas',
  1536. },
  1537. {
  1538. country_code: 'bh',
  1539. country_name: 'Bahrain',
  1540. },
  1541. {
  1542. country_code: 'bd',
  1543. country_name: 'Bangladesh',
  1544. },
  1545. {
  1546. country_code: 'bb',
  1547. country_name: 'Barbados',
  1548. },
  1549. {
  1550. country_code: 'by',
  1551. country_name: 'Belarus',
  1552. },
  1553. {
  1554. country_code: 'be',
  1555. country_name: 'Belgium',
  1556. },
  1557. {
  1558. country_code: 'bz',
  1559. country_name: 'Belize',
  1560. },
  1561. {
  1562. country_code: 'bj',
  1563. country_name: 'Benin',
  1564. },
  1565. {
  1566. country_code: 'bm',
  1567. country_name: 'Bermuda',
  1568. },
  1569. {
  1570. country_code: 'bt',
  1571. country_name: 'Bhutan',
  1572. },
  1573. {
  1574. country_code: 'bo',
  1575. country_name: 'Bolivia',
  1576. },
  1577. {
  1578. country_code: 'ba',
  1579. country_name: 'Bosnia and Herzegovina',
  1580. },
  1581. {
  1582. country_code: 'bw',
  1583. country_name: 'Botswana',
  1584. },
  1585. {
  1586. country_code: 'bv',
  1587. country_name: 'Bouvet Island',
  1588. },
  1589. {
  1590. country_code: 'br',
  1591. country_name: 'Brazil',
  1592. },
  1593. {
  1594. country_code: 'io',
  1595. country_name: 'British Indian Ocean Territory',
  1596. },
  1597. {
  1598. country_code: 'bn',
  1599. country_name: 'Brunei Darussalam',
  1600. },
  1601. {
  1602. country_code: 'bg',
  1603. country_name: 'Bulgaria',
  1604. },
  1605. {
  1606. country_code: 'bf',
  1607. country_name: 'Burkina Faso',
  1608. },
  1609. {
  1610. country_code: 'bi',
  1611. country_name: 'Burundi',
  1612. },
  1613. {
  1614. country_code: 'kh',
  1615. country_name: 'Cambodia',
  1616. },
  1617. {
  1618. country_code: 'cm',
  1619. country_name: 'Cameroon',
  1620. },
  1621. {
  1622. country_code: 'ca',
  1623. country_name: 'Canada',
  1624. },
  1625. {
  1626. country_code: 'cv',
  1627. country_name: 'Cape Verde',
  1628. },
  1629. {
  1630. country_code: 'ky',
  1631. country_name: 'Cayman Islands',
  1632. },
  1633. {
  1634. country_code: 'cf',
  1635. country_name: 'Central African Republic',
  1636. },
  1637. {
  1638. country_code: 'td',
  1639. country_name: 'Chad',
  1640. },
  1641. {
  1642. country_code: 'cl',
  1643. country_name: 'Chile',
  1644. },
  1645. {
  1646. country_code: 'cn',
  1647. country_name: 'China',
  1648. },
  1649. {
  1650. country_code: 'cx',
  1651. country_name: 'Christmas Island',
  1652. },
  1653. {
  1654. country_code: 'cc',
  1655. country_name: 'Cocos (Keeling) Islands',
  1656. },
  1657. {
  1658. country_code: 'co',
  1659. country_name: 'Colombia',
  1660. },
  1661. {
  1662. country_code: 'km',
  1663. country_name: 'Comoros',
  1664. },
  1665. {
  1666. country_code: 'cg',
  1667. country_name: 'Congo',
  1668. },
  1669. {
  1670. country_code: 'cd',
  1671. country_name: 'Congo, the Democratic Republic of the',
  1672. },
  1673. {
  1674. country_code: 'ck',
  1675. country_name: 'Cook Islands',
  1676. },
  1677. {
  1678. country_code: 'cr',
  1679. country_name: 'Costa Rica',
  1680. },
  1681. {
  1682. country_code: 'ci',
  1683. country_name: "Cote D'ivoire",
  1684. },
  1685. {
  1686. country_code: 'hr',
  1687. country_name: 'Croatia',
  1688. },
  1689. {
  1690. country_code: 'cu',
  1691. country_name: 'Cuba',
  1692. },
  1693. {
  1694. country_code: 'cy',
  1695. country_name: 'Cyprus',
  1696. },
  1697. {
  1698. country_code: 'cz',
  1699. country_name: 'Czech Republic',
  1700. },
  1701. {
  1702. country_code: 'dk',
  1703. country_name: 'Denmark',
  1704. },
  1705. {
  1706. country_code: 'dj',
  1707. country_name: 'Djibouti',
  1708. },
  1709. {
  1710. country_code: 'dm',
  1711. country_name: 'Dominica',
  1712. },
  1713. {
  1714. country_code: 'do',
  1715. country_name: 'Dominican Republic',
  1716. },
  1717. {
  1718. country_code: 'ec',
  1719. country_name: 'Ecuador',
  1720. },
  1721. {
  1722. country_code: 'eg',
  1723. country_name: 'Egypt',
  1724. },
  1725. {
  1726. country_code: 'sv',
  1727. country_name: 'El Salvador',
  1728. },
  1729. {
  1730. country_code: 'gq',
  1731. country_name: 'Equatorial Guinea',
  1732. },
  1733. {
  1734. country_code: 'er',
  1735. country_name: 'Eritrea',
  1736. },
  1737. {
  1738. country_code: 'ee',
  1739. country_name: 'Estonia',
  1740. },
  1741. {
  1742. country_code: 'et',
  1743. country_name: 'Ethiopia',
  1744. },
  1745. {
  1746. country_code: 'fk',
  1747. country_name: 'Falkland Islands (Malvinas)',
  1748. },
  1749. {
  1750. country_code: 'fo',
  1751. country_name: 'Faroe Islands',
  1752. },
  1753. {
  1754. country_code: 'fj',
  1755. country_name: 'Fiji',
  1756. },
  1757. {
  1758. country_code: 'fi',
  1759. country_name: 'Finland',
  1760. },
  1761. {
  1762. country_code: 'fr',
  1763. country_name: 'France',
  1764. },
  1765. {
  1766. country_code: 'gf',
  1767. country_name: 'French Guiana',
  1768. },
  1769. {
  1770. country_code: 'pf',
  1771. country_name: 'French Polynesia',
  1772. },
  1773. {
  1774. country_code: 'tf',
  1775. country_name: 'French Southern Territories',
  1776. },
  1777. {
  1778. country_code: 'ga',
  1779. country_name: 'Gabon',
  1780. },
  1781. {
  1782. country_code: 'gm',
  1783. country_name: 'Gambia',
  1784. },
  1785. {
  1786. country_code: 'ge',
  1787. country_name: 'Georgia',
  1788. },
  1789. {
  1790. country_code: 'de',
  1791. country_name: 'Germany',
  1792. },
  1793. {
  1794. country_code: 'gh',
  1795. country_name: 'Ghana',
  1796. },
  1797. {
  1798. country_code: 'gi',
  1799. country_name: 'Gibraltar',
  1800. },
  1801. {
  1802. country_code: 'gr',
  1803. country_name: 'Greece',
  1804. },
  1805. {
  1806. country_code: 'gl',
  1807. country_name: 'Greenland',
  1808. },
  1809. {
  1810. country_code: 'gd',
  1811. country_name: 'Grenada',
  1812. },
  1813. {
  1814. country_code: 'gp',
  1815. country_name: 'Guadeloupe',
  1816. },
  1817. {
  1818. country_code: 'gu',
  1819. country_name: 'Guam',
  1820. },
  1821. {
  1822. country_code: 'gt',
  1823. country_name: 'Guatemala',
  1824. },
  1825. {
  1826. country_code: 'gn',
  1827. country_name: 'Guinea',
  1828. },
  1829. {
  1830. country_code: 'gw',
  1831. country_name: 'Guinea-Bissau',
  1832. },
  1833. {
  1834. country_code: 'gy',
  1835. country_name: 'Guyana',
  1836. },
  1837. {
  1838. country_code: 'ht',
  1839. country_name: 'Haiti',
  1840. },
  1841. {
  1842. country_code: 'hm',
  1843. country_name: 'Heard Island and Mcdonald Islands',
  1844. },
  1845. {
  1846. country_code: 'va',
  1847. country_name: 'Holy See (Vatican City State)',
  1848. },
  1849. {
  1850. country_code: 'hn',
  1851. country_name: 'Honduras',
  1852. },
  1853. {
  1854. country_code: 'hk',
  1855. country_name: 'Hong Kong',
  1856. },
  1857. {
  1858. country_code: 'hu',
  1859. country_name: 'Hungary',
  1860. },
  1861. {
  1862. country_code: 'is',
  1863. country_name: 'Iceland',
  1864. },
  1865. {
  1866. country_code: 'in',
  1867. country_name: 'India',
  1868. },
  1869. {
  1870. country_code: 'id',
  1871. country_name: 'Indonesia',
  1872. },
  1873. {
  1874. country_code: 'ir',
  1875. country_name: 'Iran, Islamic Republic of',
  1876. },
  1877. {
  1878. country_code: 'iq',
  1879. country_name: 'Iraq',
  1880. },
  1881. {
  1882. country_code: 'ie',
  1883. country_name: 'Ireland',
  1884. },
  1885. {
  1886. country_code: 'il',
  1887. country_name: 'Israel',
  1888. },
  1889. {
  1890. country_code: 'it',
  1891. country_name: 'Italy',
  1892. },
  1893. {
  1894. country_code: 'jm',
  1895. country_name: 'Jamaica',
  1896. },
  1897. {
  1898. country_code: 'jp',
  1899. country_name: 'Japan',
  1900. },
  1901. {
  1902. country_code: 'jo',
  1903. country_name: 'Jordan',
  1904. },
  1905. {
  1906. country_code: 'kz',
  1907. country_name: 'Kazakhstan',
  1908. },
  1909. {
  1910. country_code: 'ke',
  1911. country_name: 'Kenya',
  1912. },
  1913. {
  1914. country_code: 'ki',
  1915. country_name: 'Kiribati',
  1916. },
  1917. {
  1918. country_code: 'kp',
  1919. country_name: "Korea, Democratic People's Republic of",
  1920. },
  1921. {
  1922. country_code: 'kr',
  1923. country_name: 'Korea, Republic of',
  1924. },
  1925. {
  1926. country_code: 'kw',
  1927. country_name: 'Kuwait',
  1928. },
  1929. {
  1930. country_code: 'kg',
  1931. country_name: 'Kyrgyzstan',
  1932. },
  1933. {
  1934. country_code: 'la',
  1935. country_name: "Lao People's Democratic Republic",
  1936. },
  1937. {
  1938. country_code: 'lv',
  1939. country_name: 'Latvia',
  1940. },
  1941. {
  1942. country_code: 'lb',
  1943. country_name: 'Lebanon',
  1944. },
  1945. {
  1946. country_code: 'ls',
  1947. country_name: 'Lesotho',
  1948. },
  1949. {
  1950. country_code: 'lr',
  1951. country_name: 'Liberia',
  1952. },
  1953. {
  1954. country_code: 'ly',
  1955. country_name: 'Libyan Arab Jamahiriya',
  1956. },
  1957. {
  1958. country_code: 'li',
  1959. country_name: 'Liechtenstein',
  1960. },
  1961. {
  1962. country_code: 'lt',
  1963. country_name: 'Lithuania',
  1964. },
  1965. {
  1966. country_code: 'lu',
  1967. country_name: 'Luxembourg',
  1968. },
  1969. {
  1970. country_code: 'mo',
  1971. country_name: 'Macao',
  1972. },
  1973. {
  1974. country_code: 'mk',
  1975. country_name: 'Macedonia, the Former Yugosalv Republic of',
  1976. },
  1977. {
  1978. country_code: 'mg',
  1979. country_name: 'Madagascar',
  1980. },
  1981. {
  1982. country_code: 'mw',
  1983. country_name: 'Malawi',
  1984. },
  1985. {
  1986. country_code: 'my',
  1987. country_name: 'Malaysia',
  1988. },
  1989. {
  1990. country_code: 'mv',
  1991. country_name: 'Maldives',
  1992. },
  1993. {
  1994. country_code: 'ml',
  1995. country_name: 'Mali',
  1996. },
  1997. {
  1998. country_code: 'mt',
  1999. country_name: 'Malta',
  2000. },
  2001. {
  2002. country_code: 'mh',
  2003. country_name: 'Marshall Islands',
  2004. },
  2005. {
  2006. country_code: 'mq',
  2007. country_name: 'Martinique',
  2008. },
  2009. {
  2010. country_code: 'mr',
  2011. country_name: 'Mauritania',
  2012. },
  2013. {
  2014. country_code: 'mu',
  2015. country_name: 'Mauritius',
  2016. },
  2017. {
  2018. country_code: 'yt',
  2019. country_name: 'Mayotte',
  2020. },
  2021. {
  2022. country_code: 'mx',
  2023. country_name: 'Mexico',
  2024. },
  2025. {
  2026. country_code: 'fm',
  2027. country_name: 'Micronesia, Federated States of',
  2028. },
  2029. {
  2030. country_code: 'md',
  2031. country_name: 'Moldova, Republic of',
  2032. },
  2033. {
  2034. country_code: 'mc',
  2035. country_name: 'Monaco',
  2036. },
  2037. {
  2038. country_code: 'mn',
  2039. country_name: 'Mongolia',
  2040. },
  2041. {
  2042. country_code: 'ms',
  2043. country_name: 'Montserrat',
  2044. },
  2045. {
  2046. country_code: 'ma',
  2047. country_name: 'Morocco',
  2048. },
  2049. {
  2050. country_code: 'mz',
  2051. country_name: 'Mozambique',
  2052. },
  2053. {
  2054. country_code: 'mm',
  2055. country_name: 'Myanmar',
  2056. },
  2057. {
  2058. country_code: 'na',
  2059. country_name: 'Namibia',
  2060. },
  2061. {
  2062. country_code: 'nr',
  2063. country_name: 'Nauru',
  2064. },
  2065. {
  2066. country_code: 'np',
  2067. country_name: 'Nepal',
  2068. },
  2069. {
  2070. country_code: 'nl',
  2071. country_name: 'Netherlands',
  2072. },
  2073. {
  2074. country_code: 'an',
  2075. country_name: 'Netherlands Antilles',
  2076. },
  2077. {
  2078. country_code: 'nc',
  2079. country_name: 'New Caledonia',
  2080. },
  2081. {
  2082. country_code: 'nz',
  2083. country_name: 'New Zealand',
  2084. },
  2085. {
  2086. country_code: 'ni',
  2087. country_name: 'Nicaragua',
  2088. },
  2089. {
  2090. country_code: 'ne',
  2091. country_name: 'Niger',
  2092. },
  2093. {
  2094. country_code: 'ng',
  2095. country_name: 'Nigeria',
  2096. },
  2097. {
  2098. country_code: 'nu',
  2099. country_name: 'Niue',
  2100. },
  2101. {
  2102. country_code: 'nf',
  2103. country_name: 'Norfolk Island',
  2104. },
  2105. {
  2106. country_code: 'mp',
  2107. country_name: 'Northern Mariana Islands',
  2108. },
  2109. {
  2110. country_code: 'no',
  2111. country_name: 'Norway',
  2112. },
  2113. {
  2114. country_code: 'om',
  2115. country_name: 'Oman',
  2116. },
  2117. {
  2118. country_code: 'pk',
  2119. country_name: 'Pakistan',
  2120. },
  2121. {
  2122. country_code: 'pw',
  2123. country_name: 'Palau',
  2124. },
  2125. {
  2126. country_code: 'ps',
  2127. country_name: 'Palestinian Territory, Occupied',
  2128. },
  2129. {
  2130. country_code: 'pa',
  2131. country_name: 'Panama',
  2132. },
  2133. {
  2134. country_code: 'pg',
  2135. country_name: 'Papua New Guinea',
  2136. },
  2137. {
  2138. country_code: 'py',
  2139. country_name: 'Paraguay',
  2140. },
  2141. {
  2142. country_code: 'pe',
  2143. country_name: 'Peru',
  2144. },
  2145. {
  2146. country_code: 'ph',
  2147. country_name: 'Philippines',
  2148. },
  2149. {
  2150. country_code: 'pn',
  2151. country_name: 'Pitcairn',
  2152. },
  2153. {
  2154. country_code: 'pl',
  2155. country_name: 'Poland',
  2156. },
  2157. {
  2158. country_code: 'pt',
  2159. country_name: 'Portugal',
  2160. },
  2161. {
  2162. country_code: 'pr',
  2163. country_name: 'Puerto Rico',
  2164. },
  2165. {
  2166. country_code: 'qa',
  2167. country_name: 'Qatar',
  2168. },
  2169. {
  2170. country_code: 're',
  2171. country_name: 'Reunion',
  2172. },
  2173. {
  2174. country_code: 'ro',
  2175. country_name: 'Romania',
  2176. },
  2177. {
  2178. country_code: 'ru',
  2179. country_name: 'Russian Federation',
  2180. },
  2181. {
  2182. country_code: 'rw',
  2183. country_name: 'Rwanda',
  2184. },
  2185. {
  2186. country_code: 'sh',
  2187. country_name: 'Saint Helena',
  2188. },
  2189. {
  2190. country_code: 'kn',
  2191. country_name: 'Saint Kitts and Nevis',
  2192. },
  2193. {
  2194. country_code: 'lc',
  2195. country_name: 'Saint Lucia',
  2196. },
  2197. {
  2198. country_code: 'pm',
  2199. country_name: 'Saint Pierre and Miquelon',
  2200. },
  2201. {
  2202. country_code: 'vc',
  2203. country_name: 'Saint Vincent and the Grenadines',
  2204. },
  2205. {
  2206. country_code: 'ws',
  2207. country_name: 'Samoa',
  2208. },
  2209. {
  2210. country_code: 'sm',
  2211. country_name: 'San Marino',
  2212. },
  2213. {
  2214. country_code: 'st',
  2215. country_name: 'Sao Tome and Principe',
  2216. },
  2217. {
  2218. country_code: 'sa',
  2219. country_name: 'Saudi Arabia',
  2220. },
  2221. {
  2222. country_code: 'sn',
  2223. country_name: 'Senegal',
  2224. },
  2225. {
  2226. country_code: 'rs',
  2227. country_name: 'Serbia and Montenegro',
  2228. },
  2229. {
  2230. country_code: 'sc',
  2231. country_name: 'Seychelles',
  2232. },
  2233. {
  2234. country_code: 'sl',
  2235. country_name: 'Sierra Leone',
  2236. },
  2237. {
  2238. country_code: 'sg',
  2239. country_name: 'Singapore',
  2240. },
  2241. {
  2242. country_code: 'sk',
  2243. country_name: 'Slovakia',
  2244. },
  2245. {
  2246. country_code: 'si',
  2247. country_name: 'Slovenia',
  2248. },
  2249. {
  2250. country_code: 'sb',
  2251. country_name: 'Solomon Islands',
  2252. },
  2253. {
  2254. country_code: 'so',
  2255. country_name: 'Somalia',
  2256. },
  2257. {
  2258. country_code: 'za',
  2259. country_name: 'South Africa',
  2260. },
  2261. {
  2262. country_code: 'gs',
  2263. country_name: 'South Georgia and the South Sandwich Islands',
  2264. },
  2265. {
  2266. country_code: 'es',
  2267. country_name: 'Spain',
  2268. },
  2269. {
  2270. country_code: 'lk',
  2271. country_name: 'Sri Lanka',
  2272. },
  2273. {
  2274. country_code: 'sd',
  2275. country_name: 'Sudan',
  2276. },
  2277. {
  2278. country_code: 'sr',
  2279. country_name: 'Suriname',
  2280. },
  2281. {
  2282. country_code: 'sj',
  2283. country_name: 'Svalbard and Jan Mayen',
  2284. },
  2285. {
  2286. country_code: 'sz',
  2287. country_name: 'Swaziland',
  2288. },
  2289. {
  2290. country_code: 'se',
  2291. country_name: 'Sweden',
  2292. },
  2293. {
  2294. country_code: 'ch',
  2295. country_name: 'Switzerland',
  2296. },
  2297. {
  2298. country_code: 'sy',
  2299. country_name: 'Syrian Arab Republic',
  2300. },
  2301. {
  2302. country_code: 'tw',
  2303. country_name: 'Taiwan, Province of China',
  2304. },
  2305. {
  2306. country_code: 'tj',
  2307. country_name: 'Tajikistan',
  2308. },
  2309. {
  2310. country_code: 'tz',
  2311. country_name: 'Tanzania, United Republic of',
  2312. },
  2313. {
  2314. country_code: 'th',
  2315. country_name: 'Thailand',
  2316. },
  2317. {
  2318. country_code: 'tl',
  2319. country_name: 'Timor-Leste',
  2320. },
  2321. {
  2322. country_code: 'tg',
  2323. country_name: 'Togo',
  2324. },
  2325. {
  2326. country_code: 'tk',
  2327. country_name: 'Tokelau',
  2328. },
  2329. {
  2330. country_code: 'to',
  2331. country_name: 'Tonga',
  2332. },
  2333. {
  2334. country_code: 'tt',
  2335. country_name: 'Trinidad and Tobago',
  2336. },
  2337. {
  2338. country_code: 'tn',
  2339. country_name: 'Tunisia',
  2340. },
  2341. {
  2342. country_code: 'tr',
  2343. country_name: 'Turkiye',
  2344. },
  2345. {
  2346. country_code: 'tm',
  2347. country_name: 'Turkmenistan',
  2348. },
  2349. {
  2350. country_code: 'tc',
  2351. country_name: 'Turks and Caicos Islands',
  2352. },
  2353. {
  2354. country_code: 'tv',
  2355. country_name: 'Tuvalu',
  2356. },
  2357. {
  2358. country_code: 'ug',
  2359. country_name: 'Uganda',
  2360. },
  2361. {
  2362. country_code: 'ua',
  2363. country_name: 'Ukraine',
  2364. },
  2365. {
  2366. country_code: 'ae',
  2367. country_name: 'United Arab Emirates',
  2368. },
  2369. {
  2370. country_code: 'uk',
  2371. country_name: 'United Kingdom',
  2372. },
  2373. {
  2374. country_code: 'gb',
  2375. country_name: 'United Kingdom',
  2376. },
  2377. {
  2378. country_code: 'us',
  2379. country_name: 'United States',
  2380. },
  2381. {
  2382. country_code: 'um',
  2383. country_name: 'United States Minor Outlying Islands',
  2384. },
  2385. {
  2386. country_code: 'uy',
  2387. country_name: 'Uruguay',
  2388. },
  2389. {
  2390. country_code: 'uz',
  2391. country_name: 'Uzbekistan',
  2392. },
  2393. {
  2394. country_code: 'vu',
  2395. country_name: 'Vanuatu',
  2396. },
  2397. {
  2398. country_code: 've',
  2399. country_name: 'Venezuela',
  2400. },
  2401. {
  2402. country_code: 'vn',
  2403. country_name: 'Viet Nam',
  2404. },
  2405. {
  2406. country_code: 'vg',
  2407. country_name: 'Virgin Islands, British',
  2408. },
  2409. {
  2410. country_code: 'vi',
  2411. country_name: 'Virgin Islands, U.S.',
  2412. },
  2413. {
  2414. country_code: 'wf',
  2415. country_name: 'Wallis and Futuna',
  2416. },
  2417. {
  2418. country_code: 'eh',
  2419. country_name: 'Western Sahara',
  2420. },
  2421. {
  2422. country_code: 'ye',
  2423. country_name: 'Yemen',
  2424. },
  2425. {
  2426. country_code: 'zm',
  2427. country_name: 'Zambia',
  2428. },
  2429. {
  2430. country_code: 'zw',
  2431. country_name: 'Zimbabwe',
  2432. },
  2433. ].map((x) => ({ label: x.country_name, value: x.country_code }));
  2434. export const BingCountryOptions = [
  2435. { label: 'Argentina AR', value: 'AR' },
  2436. { label: 'Australia AU', value: 'AU' },
  2437. { label: 'Austria AT', value: 'AT' },
  2438. { label: 'Belgium BE', value: 'BE' },
  2439. { label: 'Brazil BR', value: 'BR' },
  2440. { label: 'Canada CA', value: 'CA' },
  2441. { label: 'Chile CL', value: 'CL' },
  2442. { label: 'Denmark DK', value: 'DK' },
  2443. { label: 'Finland FI', value: 'FI' },
  2444. { label: 'France FR', value: 'FR' },
  2445. { label: 'Germany DE', value: 'DE' },
  2446. { label: 'Hong Kong SAR HK', value: 'HK' },
  2447. { label: 'India IN', value: 'IN' },
  2448. { label: 'Indonesia ID', value: 'ID' },
  2449. { label: 'Italy IT', value: 'IT' },
  2450. { label: 'Japan JP', value: 'JP' },
  2451. { label: 'Korea KR', value: 'KR' },
  2452. { label: 'Malaysia MY', value: 'MY' },
  2453. { label: 'Mexico MX', value: 'MX' },
  2454. { label: 'Netherlands NL', value: 'NL' },
  2455. { label: 'New Zealand NZ', value: 'NZ' },
  2456. { label: 'Norway NO', value: 'NO' },
  2457. { label: "People's Republic of China CN", value: 'CN' },
  2458. { label: 'Poland PL', value: 'PL' },
  2459. { label: 'Portugal PT', value: 'PT' },
  2460. { label: 'Republic of the Philippines PH', value: 'PH' },
  2461. { label: 'Russia RU', value: 'RU' },
  2462. { label: 'Saudi Arabia SA', value: 'SA' },
  2463. { label: 'South Africa ZA', value: 'ZA' },
  2464. { label: 'Spain ES', value: 'ES' },
  2465. { label: 'Sweden SE', value: 'SE' },
  2466. { label: 'Switzerland CH', value: 'CH' },
  2467. { label: 'Taiwan TW', value: 'TW' },
  2468. { label: 'Türkiye TR', value: 'TR' },
  2469. { label: 'United Kingdom GB', value: 'GB' },
  2470. { label: 'United States US', value: 'US' },
  2471. ];
  2472. export const BingLanguageOptions = [
  2473. { label: 'Arabic ar', value: 'ar' },
  2474. { label: 'Basque eu', value: 'eu' },
  2475. { label: 'Bengali bn', value: 'bn' },
  2476. { label: 'Bulgarian bg', value: 'bg' },
  2477. { label: 'Catalan ca', value: 'ca' },
  2478. { label: 'Chinese (Simplified) zh-hans', value: 'ns' },
  2479. { label: 'Chinese (Traditional) zh-hant', value: 'nt' },
  2480. { label: 'Croatian hr', value: 'hr' },
  2481. { label: 'Czech cs', value: 'cs' },
  2482. { label: 'Danish da', value: 'da' },
  2483. { label: 'Dutch nl', value: 'nl' },
  2484. { label: 'English en', value: 'en' },
  2485. { label: 'English-United Kingdom en-gb', value: 'gb' },
  2486. { label: 'Estonian et', value: 'et' },
  2487. { label: 'Finnish fi', value: 'fi' },
  2488. { label: 'French fr', value: 'fr' },
  2489. { label: 'Galician gl', value: 'gl' },
  2490. { label: 'German de', value: 'de' },
  2491. { label: 'Gujarati gu', value: 'gu' },
  2492. { label: 'Hebrew he', value: 'he' },
  2493. { label: 'Hindi hi', value: 'hi' },
  2494. { label: 'Hungarian hu', value: 'hu' },
  2495. { label: 'Icelandic is', value: 'is' },
  2496. { label: 'Italian it', value: 'it' },
  2497. { label: 'Japanese jp', value: 'jp' },
  2498. { label: 'Kannada kn', value: 'kn' },
  2499. { label: 'Korean ko', value: 'ko' },
  2500. { label: 'Latvian lv', value: 'lv' },
  2501. { label: 'Lithuanian lt', value: 'lt' },
  2502. { label: 'Malay ms', value: 'ms' },
  2503. { label: 'Malayalam ml', value: 'ml' },
  2504. { label: 'Marathi mr', value: 'mr' },
  2505. { label: 'Norwegian (Bokmål) nb', value: 'nb' },
  2506. { label: 'Polish pl', value: 'pl' },
  2507. { label: 'Portuguese (Brazil) pt-br', value: 'br' },
  2508. { label: 'Portuguese (Portugal) pt-pt', value: 'pt' },
  2509. { label: 'Punjabi pa', value: 'pa' },
  2510. { label: 'Romanian ro', value: 'ro' },
  2511. { label: 'Russian ru', value: 'ru' },
  2512. { label: 'Serbian (Cyrylic) sr', value: 'sr' },
  2513. { label: 'Slovak sk', value: 'sk' },
  2514. { label: 'Slovenian sl', value: 'sl' },
  2515. { label: 'Spanish es', value: 'es' },
  2516. { label: 'Swedish sv', value: 'sv' },
  2517. { label: 'Tamil ta', value: 'ta' },
  2518. { label: 'Telugu te', value: 'te' },
  2519. { label: 'Thai th', value: 'th' },
  2520. { label: 'Turkish tr', value: 'tr' },
  2521. { label: 'Ukrainian uk', value: 'uk' },
  2522. { label: 'Vietnamese vi', value: 'vi' },
  2523. ];
  2524. export const DeepLSourceLangOptions = [
  2525. { label: 'Arabic [1]', value: 'AR' },
  2526. { label: 'Bulgarian', value: 'BG' },
  2527. { label: 'Czech', value: 'CS' },
  2528. { label: 'Danish', value: 'DA' },
  2529. { label: 'German', value: 'DE' },
  2530. { label: 'Greek', value: 'EL' },
  2531. { label: 'English', value: 'EN' },
  2532. { label: 'Spanish', value: 'ES' },
  2533. { label: 'Estonian', value: 'ET' },
  2534. { label: 'Finnish', value: 'FI' },
  2535. { label: 'French', value: 'FR' },
  2536. { label: 'Hungarian', value: 'HU' },
  2537. { label: 'Indonesian', value: 'ID' },
  2538. { label: 'Italian', value: 'IT' },
  2539. { label: 'Japanese', value: 'JA' },
  2540. { label: 'Korean', value: 'KO' },
  2541. { label: 'Lithuanian', value: 'LT' },
  2542. { label: 'Latvian', value: 'LV' },
  2543. { label: 'Norwegian Bokmål', value: 'NB' },
  2544. { label: 'Dutch', value: 'NL' },
  2545. { label: 'Polish', value: 'PL' },
  2546. { label: 'Portuguese (all Portuguese varieties mixed)', value: 'PT' },
  2547. { label: 'Romanian', value: 'RO' },
  2548. { label: 'Russian', value: 'RU' },
  2549. { label: 'Slovak', value: 'SK' },
  2550. { label: 'Slovenian', value: 'SL' },
  2551. { label: 'Swedish', value: 'SV' },
  2552. { label: 'Turkish', value: 'TR' },
  2553. { label: 'Ukrainian', value: 'UK' },
  2554. { label: 'Chinese', value: 'ZH' },
  2555. ];
  2556. export const DeepLTargetLangOptions = [
  2557. { label: 'Arabic [1]', value: 'AR' },
  2558. { label: 'Bulgarian', value: 'BG' },
  2559. { label: 'Czech', value: 'CS' },
  2560. { label: 'Danish', value: 'DA' },
  2561. { label: 'German', value: 'DE' },
  2562. { label: 'Greek', value: 'EL' },
  2563. { label: 'English (British)', value: 'EN-GB' },
  2564. { label: 'English (American)', value: 'EN-US' },
  2565. { label: 'Spanish', value: 'ES' },
  2566. { label: 'Estonian', value: 'ET' },
  2567. { label: 'Finnish', value: 'FI' },
  2568. { label: 'French', value: 'FR' },
  2569. { label: 'Hungarian', value: 'HU' },
  2570. { label: 'Indonesian', value: 'ID' },
  2571. { label: 'Italian', value: 'IT' },
  2572. { label: 'Japanese', value: 'JA' },
  2573. { label: 'Korean', value: 'KO' },
  2574. { label: 'Lithuanian', value: 'LT' },
  2575. { label: 'Latvian', value: 'LV' },
  2576. { label: 'Norwegian Bokmål', value: 'NB' },
  2577. { label: 'Dutch', value: 'NL' },
  2578. { label: 'Polish', value: 'PL' },
  2579. { label: 'Portuguese (Brazilian)', value: 'PT-BR' },
  2580. {
  2581. label:
  2582. 'Portuguese (all Portuguese varieties excluding Brazilian Portuguese)',
  2583. value: 'PT-PT',
  2584. },
  2585. { label: 'Romanian', value: 'RO' },
  2586. { label: 'Russian', value: 'RU' },
  2587. { label: 'Slovak', value: 'SK' },
  2588. { label: 'Slovenian', value: 'SL' },
  2589. { label: 'Swedish', value: 'SV' },
  2590. { label: 'Turkish', value: 'TR' },
  2591. { label: 'Ukrainian', value: 'UK' },
  2592. { label: 'Chinese (simplified)', value: 'ZH' },
  2593. ];
  2594. export const BaiduFanyiDomainOptions = [
  2595. 'it',
  2596. 'finance',
  2597. 'machinery',
  2598. 'senimed',
  2599. 'novel',
  2600. 'academic',
  2601. 'aerospace',
  2602. 'wiki',
  2603. 'news',
  2604. 'law',
  2605. 'contract',
  2606. ];
  2607. export const BaiduFanyiSourceLangOptions = [
  2608. 'auto',
  2609. 'zh',
  2610. 'en',
  2611. 'yue',
  2612. 'wyw',
  2613. 'jp',
  2614. 'kor',
  2615. 'fra',
  2616. 'spa',
  2617. 'th',
  2618. 'ara',
  2619. 'ru',
  2620. 'pt',
  2621. 'de',
  2622. 'it',
  2623. 'el',
  2624. 'nl',
  2625. 'pl',
  2626. 'bul',
  2627. 'est',
  2628. 'dan',
  2629. 'fin',
  2630. 'cs',
  2631. 'rom',
  2632. 'slo',
  2633. 'swe',
  2634. 'hu',
  2635. 'cht',
  2636. 'vie',
  2637. ];
  2638. export const QWeatherLangOptions = [
  2639. 'zh',
  2640. 'zh-hant',
  2641. 'en',
  2642. 'de',
  2643. 'es',
  2644. 'fr',
  2645. 'it',
  2646. 'ja',
  2647. 'ko',
  2648. 'ru',
  2649. 'hi',
  2650. 'th',
  2651. 'ar',
  2652. 'pt',
  2653. 'bn',
  2654. 'ms',
  2655. 'nl',
  2656. 'el',
  2657. 'la',
  2658. 'sv',
  2659. 'id',
  2660. 'pl',
  2661. 'tr',
  2662. 'cs',
  2663. 'et',
  2664. 'vi',
  2665. 'fil',
  2666. 'fi',
  2667. 'he',
  2668. 'is',
  2669. 'nb',
  2670. ];
  2671. export const QWeatherTypeOptions = ['weather', 'indices', 'airquality'];
  2672. export const QWeatherUserTypeOptions = ['free', 'paid'];
  2673. export const QWeatherTimePeriodOptions = [
  2674. 'now',
  2675. '3d',
  2676. '7d',
  2677. '10d',
  2678. '15d',
  2679. '30d',
  2680. ];
  2681. export const ExeSQLOptions = ['mysql', 'postgresql', 'mariadb'].map((x) => ({
  2682. label: upperFirst(x),
  2683. value: x,
  2684. }));
  2685. export const SwitchElseTo = 'end_cpn_id';
  2686. export const SwitchOperatorOptions = [
  2687. { value: '=', label: 'equal' },
  2688. { value: '≠', label: 'notEqual' },
  2689. { value: '>', label: 'gt' },
  2690. { value: '≥', label: 'ge' },
  2691. { value: '<', label: 'lt' },
  2692. { value: '≤', label: 'le' },
  2693. { value: 'contains', label: 'contains' },
  2694. { value: 'not contains', label: 'notContains' },
  2695. { value: 'start with', label: 'startWith' },
  2696. { value: 'end with', label: 'endWith' },
  2697. { value: 'empty', label: 'empty' },
  2698. { value: 'not empty', label: 'notEmpty' },
  2699. ];
  2700. export const SwitchLogicOperatorOptions = ['and', 'or'];
  2701. export const WenCaiQueryTypeOptions = [
  2702. 'stock',
  2703. 'zhishu',
  2704. 'fund',
  2705. 'hkstock',
  2706. 'usstock',
  2707. 'threeboard',
  2708. 'conbond',
  2709. 'insurance',
  2710. 'futures',
  2711. 'lccp',
  2712. 'foreign_exchange',
  2713. ];
  2714. export const Jin10TypeOptions = ['flash', 'calendar', 'symbols', 'news'];
  2715. export const Jin10FlashTypeOptions = new Array(5)
  2716. .fill(1)
  2717. .map((x, idx) => (idx + 1).toString());
  2718. export const Jin10CalendarTypeOptions = ['cj', 'qh', 'hk', 'us'];
  2719. export const Jin10CalendarDatashapeOptions = ['data', 'event', 'holiday'];
  2720. export const Jin10SymbolsTypeOptions = ['GOODS', 'FOREX', 'FUTURE', 'CRYPTO'];
  2721. export const Jin10SymbolsDatatypeOptions = ['symbols', 'quotes'];
  2722. export const TuShareSrcOptions = [
  2723. 'sina',
  2724. 'wallstreetcn',
  2725. '10jqka',
  2726. 'eastmoney',
  2727. 'yuncaijing',
  2728. 'fenghuang',
  2729. 'jinrongjie',
  2730. ];