1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[1904],{72744(e,t,l){var n=l(79015),r=l(89077),a=l(47801),i=l(32483);function s(e){var t;let{t:l}=(0,r.Bd)(),{group:s,label:o,ratio:d,copyable:u=!1,showDot:c,className:m,...f}=e,h=s?.trim(),p="auto"===h,g=!h,x=p||g,v=(t={labelOverride:o,groupName:h,isAutoGroup:p,isEmptyGroup:g,t:l}).labelOverride?t.labelOverride:t.isEmptyGroup?t.t("User Group"):t.isAutoGroup?t.t("Auto"):t.groupName??"",y=(0,n.jsx)(i.Wh,{...f,copyable:u,label:v,showDot:c??(!x&&void 0),variant:x?"neutral":void 0,autoColor:x?void 0:h,className:(0,a.cn)("min-w-0 shrink overflow-hidden",m)});return null==d?y:(0,n.jsxs)("span",{className:"inline-flex max-w-full min-w-0 items-center gap-2 text-xs",children:[(0,n.jsx)("span",{className:"max-w-full min-w-0 overflow-hidden",children:y}),(0,n.jsx)("span",{className:(0,a.cn)("inline-flex h-5 shrink-0 items-center rounded-full px-1.5 font-mono text-xs leading-none font-medium tabular-nums",d>1?"bg-warning/10 text-warning":d<1?"bg-info/10 text-info":"bg-muted text-muted-foreground"),children:(0,n.jsxs)("span",{children:[d,"x"]})})]})}l.d(t,{d:()=>s})},13955(e,t,l){var n=l(79015),r=l(13663),a=l(99752),i=l(30935),s=l(57736),o=l(65311),d=l(89077),u=l(73178),c=l(62724),m=l(32512),f=l(47801);function h(e){try{if(!e.trim())return[];let t=JSON.parse(e);if(!t||"object"!=typeof t||Array.isArray(t))return[];return Object.entries(t).map((e,t)=>{let[l,n]=e;return{id:`${Date.now()}-${t}`,key:l,value:"object"==typeof n?JSON.stringify(n):String(n)}})}catch{return[]}}function p(e){let{value:t,onChange:l,disabled:p=!1,keyPlaceholder:g,valuePlaceholder:x,keyLabel:v,valueLabel:y,emptyMessage:b,template:j,valueType:w="string"}=e,{t:N}=(0,d.Bd)(),C=b??N('No mappings configured. Click "Add Row" to get started.'),S=g??N("Key"),k=x??N("Value"),A=v??N("Key"),z=y??N("Value"),[O,P]=(0,o.useState)("visual"),[D,I]=(0,o.useState)(()=>h(t)),[F,V]=(0,o.useState)(t),K=e=>{I(h(e))};(0,o.useEffect)(()=>{t!==F&&(V(t),K(t))},[t]);let M=e=>{if(0===e.length)return"";let t={};return e.forEach(e=>{if(e.key.trim()){let l=e.value.trim();if("number"===w)l=Number(l)||0;else if("any"===w)try{l=JSON.parse(e.value)}catch{l=e.value.trim()}t[e.key.trim()]=l}}),JSON.stringify(t,null,2)},W=(e,t,n)=>{let r=D.map(l=>l.id===e?{...l,[t]:n}:l);I(r);let a=M(r);V(a),l(a)};return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("div",{className:"flex items-center justify-between",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(u.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{if("visual"===O){let e=M(D);V(e),l(e),P("json")}else K(F),P("visual")},disabled:p,children:"visual"===O?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{className:"mr-2 h-4 w-4"}),N("JSON Mode")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{className:"mr-2 h-4 w-4"}),N("Visual Mode")]})}),j&&(0,n.jsx)(u.$,{type:"button",variant:"link",size:"sm",className:"h-auto p-0",onClick:()=>{if(!j)return;let e=JSON.stringify(j,null,2);V(e),l(e),K(e)},disabled:p,children:N("Fill Template")})]})}),"visual"===O?(0,n.jsxs)("div",{className:"space-y-2",children:[D.length>0?(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2 text-sm font-medium",children:[(0,n.jsx)("div",{children:A}),(0,n.jsx)("div",{children:z}),(0,n.jsx)("div",{className:"w-10"})]}),D.map(e=>(0,n.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2",children:[(0,n.jsx)(c.p,{value:e.key,onChange:t=>W(e.id,"key",t.target.value),placeholder:S,disabled:p}),(0,n.jsx)(c.p,{value:e.value,onChange:t=>W(e.id,"value",t.target.value),placeholder:k,disabled:p}),(0,n.jsx)(u.$,{type:"button",variant:"ghost",size:"icon","aria-label":"Delete row",onClick:()=>{var t;let n,r;return t=e.id,I(n=D.filter(e=>e.id!==t)),void(V(r=M(n)),l(r))},disabled:p,className:"h-10 w-10",children:(0,n.jsx)(i.A,{className:"h-4 w-4","aria-hidden":"true"})})]},e.id))]}):(0,n.jsx)("div",{className:"text-muted-foreground flex h-24 items-center justify-center rounded-md border border-dashed text-sm",children:C}),(0,n.jsxs)(u.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{I([...D,{id:`${Date.now()}`,key:"",value:""}])},disabled:p,className:"w-full",children:[(0,n.jsx)(s.A,{className:"mr-2 h-4 w-4"}),N("Add Row")]})]}):(0,n.jsx)(m.T,{value:F,onChange:e=>{var t;V(t=e.target.value),l(t),K(t)},placeholder:j?JSON.stringify(j,null,2):'{"key": "value"}',disabled:p,rows:8,className:(0,f.cn)("font-mono text-sm")})]})}l.d(t,{i:()=>p})},70979(e,t,l){var n=l(79015),r=l(33434),a=l(94084),i=l(65311),s=l(89077),o=l(26028),d=l(79875),u=l(12174),c=l(47801);let m=/[,ï¼\n]/;function f(e){let{t}=(0,s.Bd)(),l=e.placeholder??t("Select items..."),f=(0,d.I0)(),[h,p]=i.useState(""),[g,x]=i.useState(!1),[v,y]=i.useState(!1),b=i.useMemo(()=>new Set(e.selected),[e.selected]),j=i.useMemo(()=>{let t=new Map;for(let l of e.options)t.set(l.value,l.label);return t},[e.options]),w=h.trim(),N=w.length>0&&(b.has(w)||e.options.some(e=>e.value===w||e.label===w)),C=!0===e.allowCreate&&w.length>0&&!N,S=i.useMemo(()=>{let t=new Set(e.options.map(e=>e.value));for(let l of e.selected)t.add(l);return C&&t.add(w),Array.from(t)},[e.options,e.selected,C,w]),k=i.useCallback(t=>{let l=[],n=new Set(e.selected);for(let e of t){let t=e.trim();t&&(n.has(t)||(n.add(t),l.push(t)))}0!==l.length&&e.onChange([...e.selected,...l])},[e]),A=i.useCallback(async(e,l,n)=>{e.preventDefault(),e.stopPropagation(),await (0,u.l)(l)?o.oR.success(t("C
1opied: {{model}}",{model:n})):o.oR.error(t("Failed to copy"))},[t]);return(0,n.jsxs)(d.G3,{multiple:!0,items:S,value:e.selected,onValueChange:t=>{e.onChange(t),t.length>e.selected.length&&p("")},inputValue:h,onInputValueChange:t=>{if(!e.allowCreate)return void p(t);let l=function(e){if(!m.test(e))return{completed:[],draft:e};let t=e.replaceAll("ï¼",",").replaceAll("\n",",").split(","),l=t.at(-1)??"";return{completed:t.slice(0,-1).map(e=>e.trim()).filter(Boolean),draft:l}}(t);if(l.completed.length>0){k(l.completed),p(l.draft);return}p(t)},open:g,onOpenChange:x,disabled:e.disabled,children:[(0,n.jsxs)(d.HL,{ref:f,className:(0,c.cn)("w-full",e.className),children:[(0,n.jsx)(d.pn,{children:l=>{if(e.renderSelectedSummary)return(0,n.jsx)("span",{className:"bg-muted text-muted-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center rounded-sm px-1.5 font-mono text-xs font-medium whitespace-nowrap",children:e.renderSelectedSummary(l)});let r="number"!=typeof e.maxVisibleChips||v?l:l.slice(0,e.maxVisibleChips),a=l.length-r.length;return(0,n.jsxs)(n.Fragment,{children:[r.map(l=>{let r=j.get(l)??l;return(0,n.jsx)(d.em,{children:e.copyChipOnClick?(0,n.jsx)("button",{type:"button",onClick:e=>A(e,l,r),onPointerDown:e=>e.stopPropagation(),title:t("Click to copy"),className:"max-w-[16rem] cursor-pointer truncate rounded-sm hover:underline",children:r}):(0,n.jsx)("span",{className:"max-w-[16rem] truncate",children:r})},l)}),a>0&&(0,n.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),y(!0)},onPointerDown:e=>e.stopPropagation(),title:t("Show All"),className:"bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground flex h-[calc(--spacing(5.25))] w-fit cursor-pointer items-center justify-center rounded-sm px-1.5 text-xs font-medium whitespace-nowrap transition-colors",children:t("+{{count}} more",{count:a})}),v&&"number"==typeof e.maxVisibleChips&&l.length>e.maxVisibleChips&&(0,n.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),y(!1)},onPointerDown:e=>e.stopPropagation(),title:t("Collapse"),className:"bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground flex h-[calc(--spacing(5.25))] w-fit cursor-pointer items-center justify-center rounded-sm px-1.5 text-xs font-medium whitespace-nowrap transition-colors",children:t("Collapse")})]})}}),(0,n.jsx)(d.pJ,{id:e.id,placeholder:0!==e.selected.length||e.render
1SelectedSummary?void 0:l,onKeyDown:t=>{if("Enter"===t.key&&e.allowCreate&&C){let e=document.querySelector('[data-slot="combobox-content"][data-open]');e?.querySelector("[data-highlighted]")==null&&(t.preventDefault(),k([w]),p(""))}},"aria-label":l})]}),(0,n.jsxs)(d.h5,{anchor:f,children:[(0,n.jsx)(d.ex,{children:(0,n.jsx)(d.uL,{children:l=>{let i=C&&l===w,s=j.get(l)??l;return(0,n.jsx)(d.x4,{value:l,className:i?"text-foreground":void 0,children:i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.n,{icon:r.A,strokeWidth:2,className:"text-muted-foreground","aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate",children:e.createLabel?t(e.createLabel,{value:l}):t('Add "{{value}}"',{value:l})})]}):(0,n.jsx)("span",{className:"truncate",children:s})},l)}})}),(0,n.jsx)(d.$U,{children:e.emptyText??t("No matching items")})]})]})}l.d(t,{K:()=>f})},16038(e,t,l){var n=l(79015),r=l(98918),a=l(47801),i=l(32483);function s(e){let{className:t,iconKey:l,iconSize:s=14,label:o,colorText:d=!0,...u}=e,c=l?(0,r.Y)(l,s):null;return(0,n.jsxs)("div",{"data-slot":"provider-badge",className:(0,a.cn)("flex max-w-full min-w-0 items-center gap-1.5",t),children:[c&&(0,n.jsx)("span",{className:"flex shrink-0 items-center",children:c}),(0,n.jsx)(i.Wh,{label:o,autoColor:d?o:void 0,variant:d?void 0:"neutral",size:"sm",className:(0,a.cn)("min-w-0 shrink overflow-hidden",!c&&"pl-0"),...u})]})}l.d(t,{d:()=>s})},41645(e,t,l){var n=l(79015),r=l(47801);function a(e){return(0,n.jsx)("span",{className:(0,r.cn)("text-muted-foreground inline-block font-mono tabular-nums",e.className),children:e.value})}l.d(t,{C:()=>a})},10625(e,t,l){var n=l(65311);let r="page-size";function a(e){let{search:t,navigate:l,pagination:a,globalFilter:i,columnFilters:s=[]}=e,o=a?.pageKey??"page",d=a?.pageSizeKey??"pageSize",u=a?.defaultPage??1,c=a?.defaultPageSize??20,m=i?.key??"filter",f=i?.enabled??!0,h=i?.trim??!0,p=(0,n.useMemo)(()=>{let e=[];for(let l of s){let n=t[l.searchKey],r=l.deserialize??(e=>e);if("string"===l.type){let t=r(n)??"";"string"==typeof t&&""!==t.trim()&&e.push({id:l.columnId,value:t})}else{let t=r(n)??[];Array.isArray(t)&&t.length>0&&e.push({id:l.columnId,value:t})}}return e},[s,t]),[g,x]=(0,n.useState)(p);(0,n.useEffect)(()=>{x(p)},[t]);let v=(0,n.useMemo)(()=>{let e=t[o],l=t[d];return{pageIndex:Math.max(0,("number"==typeof e?e:u)-1),pageSize:"number"==typeof l?l:function(){try{let e=parseInt(localStorage.getItem(r)??"",10);return e>0?e:void 0}catch{return}}()??c}},[t,o,d,u,c]),[y,b]=(0,n.useState)(()=>{if(!f)return;let e=t[m];return"string"==typeof e?e:""}),j=f?e=>{let t="function"==typeof e?e(y??""):e,n=h?t.trim():t;b(n),l({search:e=>({...e,[o]:void 0,[m]:n||void 0})})}:void 0;return{globalFilter:f?y??"":void 0,onGlobalFilterChange:j,columnFilters:g,onColumnFiltersChange:e=>{let t="function"==typeof e?e(g):e;x(t);let n={};for(let e of s){let l=t.find(t=>t.id===e.columnId),r=e.serialize??(e=>e);if("string"===e.type){let t="string"==typeof l?.value?l.value:"";n[e.searchKey]=""!==t.trim()?r(t):void 0}else{let t=Array.isArray(l?.value)?l.value:[];n[e.searchKey]=t.length>0?r(t):void 0}}l({search:e=>({...e,[o]:void 0,...n})})},pagination:v,onPaginationChange:e=>{let t="function"==typeof e?e(v):e,n=t.pageIndex+1,a=t.pageSize;a!==v.pageSize&&function(e){try{localStorage.setItem(r,String(e))}catch{}}(a),l({search:e=>({...e,[o]:n<=u?void 0:n,[d]:a})})},ensurePageInRange:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{resetTo:"first"},r=t[o],a="number"==typeof r?r:u;e>0&&a>e&&l({replace:!0,search:t=>({...t,[o]:"last"===n.resetTo?e:void 0})})}}}l.d(t,{c:()=>a})},98918(e,t,l){var n=l(79015),r=l(42171);function a(e){let t,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;if(!e||"string"!=typeof e)return(0,n.jsx)("div",{className:"bg-muted text-muted-foreground flex items-center justify-center rounded-full text-xs font-medium",style:{width:a,height:a},children:"?"});let i=e.trim();if(!i)return(0,n.jsx)("div",{className:"bg-muted text-muted-foreground flex items-center justify-center rounded-full text-xs font-medium",style:{width:a,height:a},children:"?"});let s=i.split("."),o=s[0],d=r[o];if(d&&s.length>
11&&d[s[1]]?(t=d[s[1]],l=2):(t=r[o],l=s.length>1&&/^[A-Z]/.test(s[1])?2:1),!t||"function"!=typeof t&&"object"!=typeof t){let e=i.charAt(0).toUpperCase();return(0,n.jsx)("div",{className:"bg-muted text-muted-foreground flex items-center justify-center rounded-full text-xs font-medium",style:{width:a,height:a},children:e})}let u={};for(let e=l;e<s.length;e++){let t=s[e];if(!t)continue;let l=t.indexOf("=");if(-1===l){u[t.trim()]=!0;continue}let n=t.slice(0,l).trim(),r=t.slice(l+1).trim();u[n]=function(e){if(null==e)return!0;let t=String(e).trim();return(t.startsWith("{")&&t.endsWith("}")&&(t=t.slice(1,-1).trim()),t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))?t.slice(1,-1):"true"===t||"false"!==t&&(/^-?\d+(?:\.\d+)?$/.test(t)?Number(t):t)}(r)}return null==u.size&&null!=a&&(u.size=a),(0,n.jsx)(t,{...u})}l.d(t,{Y:()=>a})}}]);
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.