PageSourceSearch

https://doc.fastgpt.io/_next/static/chunks/3180-be1787b2bd5f060b.js

js fastgpt.io collected 2026-10-09 22:41:05 UTC 11,152 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3180],{1759:(e,r,t)=>{t.r(r),t.d(r,{Accordion:()=>X,Accordions:()=>q});var n=t(73590),o=t(39574),a=t(93825),i=t(23276),l=t(97487),c=t(73894),s=t(85699),d=t(45615),u=t(89282),f=t(55176),p=t(64249),m=Object.defineProperty,h=(e,r)=>m(e,"name",{value:r,configurable:!0}),g={Multiple:"multiple"},b={Vertical:"vertical",Horizontal:"horizontal"},x={LTR:"ltr"},w="Accordion",v=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[A,C,j]=(0,i.N)(w),[y,R]=(0,a.A)(w,[j,u.z3]),k=(0,u.z3)(),N=o.forwardRef(h(function(e,r){let{type:t,...o}=e;return(0,n.jsx)(A.Provider,{scope:e.__scopeAccordion,children:t===g.Multiple?(0,n.jsx)(T,{...o,ref:r}):(0,n.jsx)(L,{...o,ref:r})})},"Accordion")),[I,P]=y(w),[_,E]=y(w,{collapsible:!1}),L=o.forwardRef(h(function(e,r){let{value:t,defaultValue:a,onValueChange:i=h(()=>{},"onValueChange"),collapsible:l=!1,...c}=e,[d,u]=(0,s.i)({prop:t,defaultProp:null!=a?a:"",onChange:i,caller:w});return(0,n.jsx)(I,{scope:e.__scopeAccordion,value:o.useMemo(()=>d?[d]:[],[d]),onItemOpen:u,onItemClose:o.useCallback(()=>l&&u(""),[l,u]),children:(0,n.jsx)(_,{scope:e.__scopeAccordion,collapsible:l,children:(0,n.jsx)(S,{...c,ref:r})})})},"AccordionImplSingle")),T=o.forwardRef(h(function(e,r){let{value:t,defaultValue:a,onValueChange:i=h(()=>{},"onValueChange"),...l}=e,[c,d]=(0,s.i)({prop:t,defaultProp:null!=a?a:[],onChange:i,caller:w}),u=o.useCallback(e=>d(function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...r,e]}),[d]),f=o.useCallback(e=>d(function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return r.filter(r=>r!==e)}),[d]);return(0,n.jsx)(I,{scope:e.__scopeAccordion,value:c,onItemOpen:u,onItemClose:f,children:(0,n.jsx)(_,{scope:e.__scopeAccordion,collapsible:!0,children:(0,n.jsx)(S,{...l,ref:r})})})},"AccordionImplMultiple")),[z,D]=y(w),S=o.forwardRef(h(function(e,r){let{__scopeAccordion:t,disabled:a,dir:i,orientation:s=b.Vertical,...u}=e,f=o.useRef(null),m=(0,l.s)(f,r),g=C(t),w=(0,p.jH)(i)===x.LTR,j=(0,c.mK)(e.onKeyDown,e=>{var r;if(!v.includes(e.key))return;let t=e.target,n=g().filter(e=>{var r;return!(null==(r=e.ref.current)?void 0:r.disabled)}),o=n.findIndex(e=>e.ref.current===t),a=n.length;if(-1===o)return;e.preventDefault();let i=o,l=a-1,c=h(()=>{(i=o+1)>l&&(i=0)},"moveNext"),d=h(()=>{(i=o-1)<0&&(i=l)},"movePrev");switch(e.key){case"Home":i=0;break;case"End":i=l;break;case"ArrowRight":s===b.Horizontal&&(w?c():d());break;case"ArrowDown":s===b.Vertical&&c();break;case"ArrowLeft":s===b.Horizontal&&(w?d():c());break;case"ArrowUp":s===b.Vertical&&d()}null==(r=n[i%a].ref.current)||r.focus()});return(0,n.jsx)(z,{scope:t,disabled:a,direction:i,orientation:s,children:(0,n.jsx)(A.Slot,{scope:t,children:(0,n.jsx)(d.sG.div,{...u,"data-orientation":s,ref:m,onKeyDown:a?void 0:j})})})},"AccordionImpl")),O="AccordionItem",[H,U]=y(O),V=o.forwardRef(h(function(e,r){let{__scopeAccordion:t,value:o,...a}=e,i=D(O,t),l=P(O,t),c=k(t),s=(0,f.B)(),d=o&&l.value.includes(o)||!1,p=i.disabled||e.disabled;return(0,n.jsx)(H,{scope:t,open:d,disabled:p,triggerId:s,children:(0,n.jsx)(u.bL,{"data-orientation":i.orientation,"data-state":J(d),...c,...a,ref:r,disabled:p,open:d,onOpenChange:e=>{e?l.onItemOpen(o):l.onItemClose(o)}})})},"AccordionItem")),B=o.forwardRef(h(function(e,r){let{__scopeAccordion:t,...o}=e,a=D(w,t),i=U("AccordionHeader",t);return(0,n.jsx)(d.sG.h3,{"data-orientation":a.orientation,"data-state":J(i.open),"data-disabled":i.disabled?"":void 0,...o,ref:r})},"AccordionHeader")),G="AccordionTrigger",K=o.forwardRef(h(function(e,r){let{__scopeAccordion:t,...o}=e,a=D(w,t),i=U(G,t),l=E(G,t),c=k(t);return(0,n.jsx)(A.ItemSlot,{scope:t,children:(0,n.jsx)(u.l9,{"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...c,...o,ref:r})})},"AccordionTrigger")),M=o.forwardRef(h(function(e,r){let{__scopeAccordion:t,...o}=e,a=D(w,t),i=U("AccordionContent",t),l=k(t);return(0,n.jsx)(u.UC,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...l,...o,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})},"AccordionContent"));function J(e){return e?"open":"closed"}h(J,"getState");var Q=t(17707),W=t(97556),F=t(85753),Z=t(80671),$=t(87536);let q=(0,o.forwardRef)((e,r)=>{let{type:t="single",className:a,defaultValue:i,...l}=e,c=(0,o.useRef)(null),s=(0,$.P)(r,c),[d,u]=(0,o.useState)(()=>"single"===t?null!=i?i:"":null!=i?i:[]);return(0,o.useEffect)(()=>{let e=window.location.hash.substring(1),r=c.current;if(!r||0===e.length)return;let t=document.getElementById(e);if(!t||!r.contains(t))return;let n=t.getAttribute("data-accordion-value");n&&u(e=>"string"==typeof e?n:[n,...e])},[]),(0,n.jsx)(N,{type:t,ref:s,value:d,onValueChange:u,collapsible:"single"===t||void 0,className:(0,W.QP)("divide-y divide-fd-border overflow-hidden rounded-lg border bg-fd-card",a),...l})});q.displayName="Accordions";let X=(0,o.forwardRef)((e,r)=>{let{title:t,className:o,id:a,value:i=String(t),children:l,...c}=e;return(0,n.jsxs)(V,{ref:r,value:i,className:(0,W.QP)("scroll-m-24",o),...c,children:[(0,n.jsxs)(B,{id:a,"data-accordion-value":i,className:"not-prose flex flex-row items-center text-fd-card-foreground font-medium has-focus-visible:bg-fd-accent",children:[(0,n.jsxs)(K,{className:"group flex flex-1 items-center gap-2 px-3 py-2.5 text-start focus-visible:outline-none",children:[(0,n.jsx)(Q.c_,{className:"size-4 shrink-0 text-fd-muted-foreground transition-transform duration-200 group-data-[state=open]:rotate-90"}),t]}),a?(0,n.jsx)(Y,{id:a}):null]}),(0,n.jsx)(M,{className:"overflow-hidden data-[state=closed]:animate-fd-accordion-up data-[state=open]:animate-fd-accordion-down",children:(0,n.jsx)("div",{className:"px-4 pb-2 text-[15px] prose-no-margin",children:l})})]})});function Y(e){let{id:r}=e,[t,o]=(0,F.x)(()=>{let e=new URL(window.location.href);return e.hash=r,navigator.clipboard.writeText(e.toString())});return(0,n.jsx)("button",{type:"button","aria-label":"Copy Link",className:(0,W.QP)((0,Z.r)({color:"ghost",className:"text-fd-muted-foreground me-2"})),onClick:o,children:t?(0,n.jsx)(Q.Jl,{className:"size-3.5"}):(0,n.jsx)(Q.N_,{className:"size-3.5"})})}X.displayName="Accordion"},14218:(e,r,t)=>{t.d(r,{J:()=>
1o});var n=t(39574);function o(e){let r=(0,n.useRef)(e);return r.current=e,(0,n.useCallback)(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.current(...t)},[])}},81067:(e,r,t)=>{var n=t(37683);t.o(n,"useParams")&&t.d(r,{useParams:function(){return n.useParams}}),t.o(n,"usePathname")&&t.d(r,{usePathname:function(){return n.usePathname}}),t.o(n,"useRouter")&&t.d(r,{useRouter:function(){return n.useRouter}})},85753:(e,r,t)=>{t.d(r,{x:()=>a});var n=t(39574),o=t(14218);function a(e){let[r,t]=(0,n.useState)(!1),a=(0,n.useRef)(null),i=(0,o.J)(()=>{a.current&&window.clearTimeout(a.current),Promise.resolve(e()).then(()=>{t(!0),a.current=window.setTimeout(()=>{t(!1)},1500)})});return(0,n.useEffect)(()=>()=>{a.current&&window.clearTimeout(a.current)},[]),[r,i]}},86346:(e,r,t)=>{t.d(r,{A:()=>n});let n=(0,t(87969).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},87536:(e,r,t)=>{t.d(r,{P:()=>n});function n(...e){return r=>{e.forEach(e=>{"function"==typeof e?e(r):e&&(e.current=r)})}}},87969:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(39574);let o=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)},a=function(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,n.forwardRef)((e,r)=>{let{color:t="currentColor",size:o=24,strokeWidth:l=2,absoluteStrokeWidth:c,className:s="",children:d,iconNode:u,...f}=e;return(0,n.createElement)("svg",{ref:r,...i,width:o,height:o,stroke:t,strokeWidth:c?24*Number(l)/Number(o):l,className:a("lucide",s),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0})(f)&&{"aria-hidden":"true"},...f},[...u.map(e=>{let[r,t]=e;return(0,n.createElement)(r,t)}),...Array.isArray(d)?d:[d]])}),c=(e,r)=>{let t=(0,n.forwardRef)((t,i)=>{let{className:c,...s}=t;return(0,n.createElement)(l,{ref:i,iconNode:r,className:a("lucide-".concat(o(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),c),...s})});return t.displayName=o(e),t}},89282:(e,r,t)=>{t.d(r,{Ke:()=>j,R6:()=>A,UC:()=>j,bL:()=>v,l9:()=>A,z3:()=>b});var n=t(39574),o=t(73894),a=t(93825),i=t(85699),l=t(44002),c=t(97487),s=t(45615),d=t(37977),u=t(55176),f=t(73590),p=Object.defineProperty,m=(e,r)=>p(e,"name",{value:r,configurable:!0}),h="Collapsible",[g,b]=(0,a.A)(h),[x,w]=g(h),v=n.forwardRef(m(function(e,r){let{__scopeCollapsible:t,open:o,defaultOpen:a,disabled:l,onOpenChange:c,...d}=e,[p,m]=(0,i.i)({prop:o,defaultProp:null!=a&&a,onChange:c,caller:h});return(0,f.jsx)(x,{scope:t,disabled:l,contentId:(0,u.B)(),open:p,onOpenToggle:n.useCallback(()=>m(e=>!e),[m]),children:(0,f.jsx)(s.sG.div,{"data-state":R(p),"data-disabled":l?"":void 0,...d,ref:r})})},"Collapsible")),A=n.forwardRef(m(function(e,r){let{__scopeCollapsible:t,...n}=e,a=w("CollapsibleTrigger",t);return(0,f.jsx)(s.sG.button,{type:"button","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open||!1,"data-state":R(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:r,onClick:(0,o.mK)(e.onClick,a.onOpenToggle)})},"CollapsibleTrigger")),C="CollapsibleContent",j=n.forwardRef(m(function(e,r){let{forceMount:t,...n}=e,o=w(C,e.__scopeCollapsible);return(0,f.jsx)(d.C,{present:t||o.open,children:e=>{let{present:t}=e;return(0,f.jsx)(y,{...n,ref:r,present:t})}})},"CollapsibleContent")),y=n.forwardRef(m(function(e,r){let{__scopeCollapsible:t,present:o,children:a,...i}=e,d=w(C,t),[u,p]=n.useState(o),m=n.useRef(null),h=(0,c.s)(r,m),g=n.useRef(0),b=g.current,x=n.useRef(0),v=x.current,A=d.open||u,j=n.useRef(A),y=n.useRef(void 0);return n.useEffect(()=>{let e=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,l.N)(()=>{let e=m.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let r=e.getBoundingClientRect();g.current=r.height,x.current=r.width,j.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),p(o)}},[d.open,o]),(0,f.jsx)(s.sG.div,{"data-state":R(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!A,...i,ref:h,style:{"--radix-collapsible-content-height":b?"".concat(b,"px"):void 0,"--radix-collapsible-content-width":v?"".concat(v,"px"):void 0,...e.style},children:A&&a})},"CollapsibleContentImpl"));function R(e){return e?"open":"closed"}m(R,"getState")}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.