mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
"use strict";(self.webpackChunkzhenxun_docs=self.webpackChunkzhenxun_docs||[]).push([[3850],{8782:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>x,frontMatter:()=>a,metadata:()=>o,toc:()=>u});var r=t(4848),l=t(8453),s=t(1470),i=t(9365);const a={title:"\u5b89\u88c5\u5c0f\u771f\u5bfb(\u624b\u52a8)",subSidebar:!1,id:"install-zhenxun"},c=void 0,o={id:"install/zhenxun/install-zhenxun",title:"\u5b89\u88c5\u5c0f\u771f\u5bfb(\u624b\u52a8)",description:"\u771f\u5bfbBot\u9700\u8981python\u7248\u672c\u4e3a >=3.10",source:"@site/docs/install/zhenxun/zhenxun.md",sourceDirName:"install/zhenxun",slug:"/install/zhenxun/",permalink:"/zhenxun_bot/install/zhenxun/",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/install/zhenxun/zhenxun.md",tags:[],version:"current",frontMatter:{title:"\u5b89\u88c5\u5c0f\u771f\u5bfb(\u624b\u52a8)",subSidebar:!1,id:"install-zhenxun"},sidebar:"installSidebar",previous:{title:"\u5b89\u88c5\u5c0f\u771f\u5bfb(nb-cli)",permalink:"/zhenxun_bot/install/zhenxun/nb-install-zhenxun"},next:{title:"\u9ed8\u8ba4\u5b89\u88c5",permalink:"/zhenxun_bot/install/webui/install-webui-default"}},d={},u=[{value:"\u4e0b\u8f7d",id:"\u4e0b\u8f7d",level:2},{value:"\u5b89\u88c5\u4f9d\u8d56\u5305",id:"\u5b89\u88c5\u4f9d\u8d56\u5305",level:2},{value:"\u5b89\u88c5poetry",id:"\u5b89\u88c5poetry",level:3},{value:"\u5b89\u88c5\u4f9d\u8d56",id:"\u5b89\u88c5\u4f9d\u8d56",level:3},{value:"\u57fa\u7840\u914d\u7f6e",id:"\u57fa\u7840\u914d\u7f6e",level:2},{value:"\u8bbe\u7f6e\u8d85\u7ea7\u7528\u6237\uff0c\u6253\u5f00 <strong>.env.dev</strong> \u6587\u4ef6\uff0c\u5728<code>SUPERUSERS</code>\u548c<code>qq</code>\u4e2d\u6dfb\u52a0\u81ea\u5df1\u7684QQ",id:"\u8bbe\u7f6e\u8d85\u7ea7\u7528\u6237\u6253\u5f00-envdev-\u6587\u4ef6\u5728superusers\u548cqq\u4e2d\u6dfb\u52a0\u81ea\u5df1\u7684qq",level:3},{value:"\u6570\u636e\u5e93\u914d\u7f6e",id:"\u6570\u636e\u5e93\u914d\u7f6e",level:3},{value:"\u57fa\u7840\u63d2\u4ef6\u914d\u7f6e",id:"\u57fa\u7840\u63d2\u4ef6\u914d\u7f6e",level:3},{value:"\u542f\u52a8",id:"\u542f\u52a8",level:2},{value:"\u5f53\u4f60\u7684\u63a7\u5236\u53f0\u51fa\u73b0\u4ee5\u4e0b\u65e5\u5fd7\uff0c\u8bf4\u660e\u4f60\u5df2\u7ecf\u6210\u529f\u4e86\ud83c\udf89\ud83c\udf89",id:"\u5f53\u4f60\u7684\u63a7\u5236\u53f0\u51fa\u73b0\u4ee5\u4e0b\u65e5\u5fd7\u8bf4\u660e\u4f60\u5df2\u7ecf\u6210\u529f\u4e86",level:4}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.admonition,{title:"\u7248\u672c\u8b66\u544a",type:"warning",children:(0,r.jsxs)(n.p,{children:["\u771f\u5bfbBot\u9700\u8981python\u7248\u672c\u4e3a ",(0,r.jsx)(n.strong,{children:">=3.10"})]})}),"\n",(0,r.jsx)(n.h2,{id:"\u4e0b\u8f7d",children:"\u4e0b\u8f7d"}),"\n",(0,r.jsxs)(n.p,{children:["\u4ece ",(0,r.jsx)(n.a,{href:"https://github.com/zhenxun-org/zhenxun_bot",children:"HibiKier / zhenxun_bot"})," clone\u4ee3\u7801 \u6216 \u76f4\u63a5\u4e0b\u8f7d ",(0,r.jsx)(n.a,{href:"https://github.com/zhenxun-org/zhenxun_bot/archive/refs/heads/main.zip",children:"\u538b\u7f29\u5305"})," \u89e3\u538b"]}),"\n",(0,r.jsx)(n.h2,{id:"\u5b89\u88c5\u4f9d\u8d56\u5305",children:"\u5b89\u88c5\u4f9d\u8d56\u5305"}),"\n",(0,r.jsx)(n.h3,{id:"\u5b89\u88c5poetry",children:"\u5b89\u88c5poetry"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"pip install poetry\n"})}),"\n",(0,r.jsx)(n.h3,{id:"\u5b89\u88c5\u4f9d\u8d56",children:"\u5b89\u88c5\u4f9d\u8d56"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"poetry install\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"warning",children:[(0,r.jsx)(n.p,{children:"\u5982\u679c\u63d0\u793a\u627e\u4e0d\u5230\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"python -m poetry install\n"})})]}),"\n",(0,r.jsx)(n.h2,{id:"\u57fa\u7840\u914d\u7f6e",children:"\u57fa\u7840\u914d\u7f6e"}),"\n",(0,r.jsxs)(n.h3,{id:"\u8bbe\u7f6e\u8d85\u7ea7\u7528\u6237\u6253\u5f00-envdev-\u6587\u4ef6\u5728superusers\u548cqq\u4e2d\u6dfb\u52a0\u81ea\u5df1\u7684qq",children:["\u8bbe\u7f6e\u8d85\u7ea7\u7528\u6237\uff0c\u6253\u5f00 ",(0,r.jsx)(n.strong,{children:".env.dev"})," \u6587\u4ef6\uff0c\u5728",(0,r.jsx)(n.code,{children:"SUPERUSERS"}),"\u548c",(0,r.jsx)(n.code,{children:"qq"}),"\u4e2d\u6dfb\u52a0\u81ea\u5df1\u7684QQ"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",metastring:'title="env.dev"',children:'SUPERUSERS=["123456789"]\n\nPLATFORM_SUPERUSERS = \'\n {\n "qq": ["123456789"],\n "dodo": [],\n "kaiheila": [],\n "discord": []\n }\n\'\n'})}),"\n",(0,r.jsx)(n.h3,{id:"\u6570\u636e\u5e93\u914d\u7f6e",children:"\u6570\u636e\u5e93\u914d\u7f6e"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsxs)(i.A,{value:"Postgresql",label:"Postgresql",default:!0,children:[(0,r.jsxs)(n.p,{children:["\u5efa\u8bae\u7684\u6570\u636e\u5e93\uff0c\u5acc\u9ebb\u70e6\u8bf7\u4f7f\u7528",(0,r.jsx)(n.code,{children:"Sqlite"})]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",metastring:'title="env.dev"',children:'# \u793a\u4f8b: "postgres://user:password@127.0.0.1:5432/database"\n\nDB_URL = "postgres://\u7528\u6237\u540d:\u5bc6\u7801@127.0.0.1:\u7aef\u53e3/\u6570\u636e\u5e93\u540d\u79f0"\n\n# \u5982\u679c\u4f60\u662f\u4e0e\u6559\u7a0b\u4e00\u6a21\u4e00\u6837\u7684\u547d\u4ee4\u4ee3\u7801\uff0c\u4e14\u6570\u636e\u5e93\u4e5f\u5728\u8be5\u670d\u52a1\u5668\u4e0a\uff0c\u53ef\u4ee5\u76f4\u63a5\u590d\u5236\u4ee5\u4e0bURL\nDB_URL = "postgres://postgres:zhenxun_bot@127.0.0.1:5432/zhenxun_bot"\n'})})]}),(0,r.jsxs)(i.A,{value:"Sqlite",label:"Sqlite",children:[(0,r.jsxs)(n.p,{children:["Sqlite\u53ef\u4ee5\u653e\u7f6e\u5728\u4efb\u4f55\u4f4d\u7f6e\uff0c",(0,r.jsx)(n.code,{children:"sqlite:"}),"\u4e4b\u540e\u4e3a\u5b58\u653e\u8def\u5f84\uff0c\u4f46\u5efa\u8bae\u5728data\u6587\u4ef6\u5939\u4e0b\u65b0\u5efadb\u6587\u4ef6\u5939\u540e\u4f7f\u7528\u4ee5\u4e0b"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",metastring:'title="env.dev"',children:'# \u793a\u4f8b: "sqlite:data/db/zhenxun.db"\n\nDB_URL = "sqlite:data/db/zhenxun.db"\n'})})]}),(0,r.jsxs)(i.A,{value:"Mysql",label:"Mysql",children:[(0,r.jsxs)(n.p,{children:["\u4e0e",(0,r.jsx)(n.code,{children:"Postgresql"}),"\u76f8\u540c"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",metastring:'title="env.dev"',children:'# \u793a\u4f8b: "mysql://user:password@127.0.0.1:3306/database"\n\nDB_URL = "mysql://\u7528\u6237\u540d:\u5bc6\u7801@127.0.0.1:\u7aef\u53e3/\u6570\u636e\u5e93\u540d\u79f0"\n'})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"\u57fa\u7840\u63d2\u4ef6\u914d\u7f6e",children:"\u57fa\u7840\u63d2\u4ef6\u914d\u7f6e"}),"\n",(0,r.jsxs)(n.p,{children:["\u6587\u4ef6\u4fdd\u5b58\u5728 ",(0,r.jsx)(n.strong,{children:"data/config.yaml"}),"\uff0c\u6240\u6709\u771f\u5bfb\u76f8\u5173\u63d2\u4ef6\u90fd\u5728\u4f7f\u7528\u8be5\u914d\u7f6e\u6587\u4ef6\uff0c\u6309\u9700\u4fee\u6539"]}),"\n",(0,r.jsx)(n.h2,{id:"\u542f\u52a8",children:"\u542f\u52a8"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"poetry run python bot.py\n\n\n## \u5982\u679c\u4f60\u60f3\u8981\u5b89\u88c5\u5305\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff0c\u4ee5httpx\u4e3a\u4f8b\u5b50\npoetry run pip install httpx\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"tip",children:[(0,r.jsx)(n.p,{children:"\u5982\u679c\u4f60\u60f3\u8981\u5b89\u88c5\u5305\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff0c\u4ee5httpx\u4e3a\u4f8b\u5b50"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"poetry run pip install httpx\n"})})]}),"\n",(0,r.jsx)(n.h4,{id:"\u5f53\u4f60\u7684\u63a7\u5236\u53f0\u51fa\u73b0\u4ee5\u4e0b\u65e5\u5fd7\u8bf4\u660e\u4f60\u5df2\u7ecf\u6210\u529f\u4e86",children:"\u5f53\u4f60\u7684\u63a7\u5236\u53f0\u51fa\u73b0\u4ee5\u4e0b\u65e5\u5fd7\uff0c\u8bf4\u660e\u4f60\u5df2\u7ecf\u6210\u529f\u4e86\ud83c\udf89\ud83c\udf89"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"08-14 23:18:44 [INFO] zhenxun | CMD[Web UI] API\u542f\u52a8\u6210\u529f\n08-14 23:18:44 [INFO] uvicorn | Application startup complete.\n08-14 23:18:44 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"warning",children:[(0,r.jsx)(n.p,{children:"\u5982\u679c\u9047\u5230 playwright \u5b89\u88c5\u76f8\u5173\u7684\u62a5\u9519\uff08\u4ee5\u4e0b\uff09"}),(0,r.jsx)("img",{src:t(9348).A,width:"500"}),(0,r.jsx)(n.p,{children:"\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u540e\u518d\u8fd0\u884c"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"poetry run playwright install\n"})})]}),"\n",(0,r.jsx)(n.admonition,{title:"\u63d0\u793a",type:"tip",children:(0,r.jsx)(n.p,{children:"\u5f53\u524d\u7248\u672c\u771f\u5bfb\u672c\u4f53\u4e0e\u63d2\u4ef6\u5e93\u5206\u79bb\uff0c\u4f60\u53ef\u4ee5\u5728\u4ee5\u4e0b\u83b7\u53d6\u63d2\u4ef6\u6216\u5176\u4ed6\u76f8\u5173\uff0c\u6216\u901a\u8fc7\u4e0e\u771f\u5bfb\u7684\u5bf9\u8bdd\u547d\u4ee4\u5b89\u88c5\u63d2\u4ef6\uff08\u63d2\u4ef6\u5546\u5e97\uff09"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{style:{textAlign:"center"},children:"\u9879\u76ee\u540d\u79f0"}),(0,r.jsx)(n.th,{style:{textAlign:"center"},children:"\u4e3b\u8981\u7528\u9014"}),(0,r.jsx)(n.th,{style:{textAlign:"center"},children:"\u4ed3\u5e93\u4f5c\u8005"}),(0,r.jsx)(n.th,{style:{textAlign:"center"},children:"\u5907\u6ce8"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/zhenxun-org/zhenxun_bot_plugins",children:"\u63d2\u4ef6\u5e93"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u63d2\u4ef6"}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/zhenxun-org",children:"zhenxun-org"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u539f plugins \u6587\u4ef6\u5939\u63d2\u4ef6"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/zhenxun-org/zhenxun_bot_plugins_index",children:"\u63d2\u4ef6\u7d22\u5f15\u5e93"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u63d2\u4ef6"}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/zhenxun-org",children:"zhenxun-org"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u6269\u5c55\u63d2\u4ef6\u7d22\u5f15\u5e93"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/soloxiaoye2022/zhenxun_bot-deploy",children:"\u4e00\u952e\u5b89\u88c5"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u5b89\u88c5"}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/soloxiaoye2022",children:"soloxiaoye2022"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u7b2c\u4e09\u65b9"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/HibiKier/zhenxun_bot_webui",children:"WebUi"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u7ba1\u7406"}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/HibiKier",children:"hibikier"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u57fa\u4e8e\u771f\u5bfb WebApi \u7684 webui \u5b9e\u73b0"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/YuS1aN/zhenxun_bot_android_ui",children:"\u5b89\u5353 app(WebUi)"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u5b89\u88c5"}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:(0,r.jsx)(n.a,{href:"https://github.com/YuS1aN",children:"YuS1aN"})}),(0,r.jsx)(n.td,{style:{textAlign:"center"},children:"\u7b2c\u4e09\u65b9"})]})]})]})]})}function x(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var r=t(4164);const l={tabItem:"tabItem_Ymn6"};var s=t(4848);function i(e){let{children:n,hidden:t,className:i}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(l.tabItem,i),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>A});var r=t(6540),l=t(4164),s=t(3104),i=t(6347),a=t(205),c=t(7485),o=t(1682),d=t(679);function u(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:l}}=e;return{value:n,label:t,attributes:r,default:l}}))}(t);return function(e){const n=(0,o.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[n,t])}function x(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:t}=e;const l=(0,i.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(l.location.search);n.set(s,e),l.replace({...l.location,search:n.toString()})}),[s,l])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:l}=e,s=h(e),[i,c]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(n){if(!x({value:n,tabValues:t}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[o,u]=p({queryString:t,groupId:l}),[b,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[l,s]=(0,d.Dv)(t);return[l,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:l}),j=(()=>{const e=o??b;return x({value:e,tabValues:s})?e:null})();(0,a.A)((()=>{j&&c(j)}),[j]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!x({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);c(e),u(e),g(e)}),[u,g,s]),tabValues:s}}var g=t(2303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(4848);function v(e){let{className:n,block:t,selectedValue:r,selectValue:i,tabValues:a}=e;const c=[],{blockElementScrollPositionUntilNextRender:o}=(0,s.a_)(),d=e=>{const n=e.currentTarget,t=c.indexOf(n),l=a[t].value;l!==r&&(o(n),i(l))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.A)("tabs",{"tabs--block":t},n),children:a.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>c.push(e),onKeyDown:u,onClick:d,...s,className:(0,l.A)("tabs__item",j.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function f(e){let{lazy:n,children:t,selectedValue:s}=e;const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:(0,l.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function y(e){const n=b(e);return(0,m.jsxs)("div",{className:(0,l.A)("tabs-container",j.tabList),children:[(0,m.jsx)(v,{...n,...e}),(0,m.jsx)(f,{...n,...e})]})}function A(e){const n=(0,g.A)();return(0,m.jsx)(y,{...e,children:u(e.children)},String(n))}},9348:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/install-playwright-5c974884ce6b0e0b0612fa06b6f6396e.png"},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(6540);const l={},s=r.createContext(l);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); |