@decocms/mesh 2.44.2 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C1oaexcn.js → AlertCircle-CJpOMpuz.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B1SBiQVA.js → ArrowLeft-CRql-3o8.js} +1 -1
- package/dist/client/assets/{ArrowUp-BvlJhwmz.js → ArrowUp-CGxVyOWd.js} +1 -1
- package/dist/client/assets/{Check-DImC9hlR.js → Check-BHH38JjB.js} +1 -1
- package/dist/client/assets/{ChevronDown-CJiuDn-R.js → ChevronDown-CoATZn7-.js} +1 -1
- package/dist/client/assets/{Code01-C3PLJdIe.js → Code01-CoC6S6Gh.js} +1 -1
- package/dist/client/assets/{Copy01-CJVQGg2V.js → Copy01-EsrXj_WU.js} +1 -1
- package/dist/client/assets/{CpuChip02-CvTMaFgN.js → CpuChip02-Bf5E5TF5.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BQhkzfkG.js → DotsHorizontal-CAeaXrnM.js} +1 -1
- package/dist/client/assets/{DotsVertical-RAbtNrG6.js → DotsVertical-BEVZytd9.js} +1 -1
- package/dist/client/assets/{Download01-DJRyuQwN.js → Download01-C45cffkQ.js} +1 -1
- package/dist/client/assets/{Edit01-DsrgmMbR.js → Edit01-Ksah6atT.js} +1 -1
- package/dist/client/assets/{File06-DdyNkMaH.js → File06-AJSjQ3A-.js} +1 -1
- package/dist/client/assets/{FilterLines-DudXubI6.js → FilterLines-DOrpWccl.js} +1 -1
- package/dist/client/assets/{FlipBackward-BT14MhEV.js → FlipBackward-DsGYr9FP.js} +1 -1
- package/dist/client/assets/{GitBranch01-DMdTTGPv.js → GitBranch01-BARmNTIX.js} +1 -1
- package/dist/client/assets/{Grid01-F6FBpTXb.js → Grid01-CJ22jDcg.js} +1 -1
- package/dist/client/assets/{Home02-CXLfj9Lm.js → Home02-DQypaXoK.js} +1 -1
- package/dist/client/assets/{Image01-CGATMxv1.js → Image01-8AwYx5eg.js} +1 -1
- package/dist/client/assets/{Inbox01-BExxQniM.js → Inbox01-D-6ikPt3.js} +1 -1
- package/dist/client/assets/{InfoCircle-BwBXEQXi.js → InfoCircle-BcNFMybj.js} +1 -1
- package/dist/client/assets/{Key01-BPqaf5vy.js → Key01-90vomEdz.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CxomLdJd.js → LinkExternal01-DfJ3r5_D.js} +1 -1
- package/dist/client/assets/{List-taDOKmLS.js → List-DiVbAsqI.js} +1 -1
- package/dist/client/assets/{Loading01-C5WNj1RN.js → Loading01-CI_v2_GN.js} +1 -1
- package/dist/client/assets/{Lock01-Di-2F0aX.js → Lock01-Du6XRM6u.js} +1 -1
- package/dist/client/assets/{Play-CrFW3Xap.js → Play-CaQDsAM-.js} +1 -1
- package/dist/client/assets/{Plus-Rzuz08cb.js → Plus-CQ_pQZI1.js} +1 -1
- package/dist/client/assets/{SearchMd-CQBqMKg_.js → SearchMd-D3oTiHfv.js} +1 -1
- package/dist/client/assets/{Terminal-kk64xKO9.js → Terminal-RipBc1up.js} +1 -1
- package/dist/client/assets/{Trash01-NIFttcxe.js → Trash01-C3d1WEuz.js} +1 -1
- package/dist/client/assets/{Upload01-DN0UV10S.js → Upload01-BZYNU4hc.js} +1 -1
- package/dist/client/assets/{X-DmFAeozb.js → X-84vjiBst.js} +1 -1
- package/dist/client/assets/{XClose-CbwF-zr_.js → XClose-lhlLOvG7.js} +1 -1
- package/dist/client/assets/{agent-detail-COGqHNUz.js → agent-detail-DYPbJe23.js} +1 -1
- package/dist/client/assets/{agents-B3iPqEqm.js → agents--eIzHT0a.js} +1 -1
- package/dist/client/assets/{alert-dialog-nojSsjex.js → alert-dialog-DWa3INCj.js} +1 -1
- package/dist/client/assets/{auth-catchall-C_OoShX7.js → auth-catchall-C08djfab.js} +1 -1
- package/dist/client/assets/{avatar-HSzeBtSD.js → avatar-Ll4kuTGx.js} +1 -1
- package/dist/client/assets/{badge-D7yW7Ams.js → badge-BQ9TMrj5.js} +1 -1
- package/dist/client/assets/{binder-BvGWgf0j.js → binder-BU8oZbeE.js} +1 -1
- package/dist/client/assets/{button-B9UDEwx9.js → button-B3OIs7uK.js} +1 -1
- package/dist/client/assets/card-D5OId4P6.js +1 -0
- package/dist/client/assets/{checkbox-DmHZ3Xhg.js → checkbox-Qjeh5BeF.js} +1 -1
- package/dist/client/assets/{collection-detail-Cmda52TC.js → collection-detail-B-iuxrNT.js} +2 -2
- package/dist/client/assets/{collection-display-button-BAinwubP.js → collection-display-button-D8FTMMt_.js} +1 -1
- package/dist/client/assets/{collection-header-d_96L4kd.js → collection-header-D_CCDQAU.js} +1 -1
- package/dist/client/assets/{collection-page-BuBCnaqK.js → collection-page-Dt3O0XSV.js} +1 -1
- package/dist/client/assets/{collection-search-Cp9Rg8cG.js → collection-search-CGm1OZ8P.js} +1 -1
- package/dist/client/assets/{collection-tab-DGpjXcu1.js → collection-tab-Dv8h91Wb.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Cfb-5BQo.js → collection-table-wrapper-DyF74Zt4.js} +1 -1
- package/dist/client/assets/connect-DiUhuR2y.js +1 -0
- package/dist/client/assets/{connection-card-DSC3U6N-.js → connection-card-BcdRIL72.js} +1 -1
- package/dist/client/assets/connection-detail-CrsiYX8R.js +1 -0
- package/dist/client/assets/{connections-3QeHd0Af.js → connections-DpO5k6L6.js} +1 -1
- package/dist/client/assets/{constants-C8DVLjyM.js → constants-C8myDR0I.js} +1 -1
- package/dist/client/assets/constants-D2PsHWWd.js +1 -0
- package/dist/client/assets/{create-organization-dialog-JxPXU7zP.js → create-organization-dialog-Bv2TpShu.js} +1 -1
- package/dist/client/assets/{dialog-DUXNadw5.js → dialog-D1jN04Y7.js} +1 -1
- package/dist/client/assets/{dropdown-menu-5V-XyUMl.js → dropdown-menu-FHEiqgML.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Ba9BM3q2.js → dynamic-plugin-layout-w9vtikLi.js} +1 -1
- package/dist/client/assets/{empty-state-Ba4zQn5e.js → empty-state-C7cYTaGj.js} +1 -1
- package/dist/client/assets/{empty-state-D6Pye5dp.js → empty-state-xyVUwDeF.js} +1 -1
- package/dist/client/assets/{env-vars-editor-BKG_L2uV.js → env-vars-editor-B_6HoX_e.js} +1 -1
- package/dist/client/assets/{error-boundary-BYKWfLka.js → error-boundary-DPf94Kzk.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CDfHtG_N.js → extract-connection-data-ChJHuI17.js} +1 -1
- package/dist/client/assets/{file-browser-D32InLNO.js → file-browser-CPVT_ZKh.js} +2 -2
- package/dist/client/assets/{form-DufpJhV9.js → form-BZ5I8G1V.js} +1 -1
- package/dist/client/assets/{grid-view-CnSMlDZ4.js → grid-view-MQQm69lZ.js} +1 -1
- package/dist/client/assets/{home-MusYVBVC.js → home-dF4syqSt.js} +1 -1
- package/dist/client/assets/{index-CNdaxvBl.js → index-BP5a2tep.js} +1 -1
- package/dist/client/assets/{index-CVzDWVip.js → index-BkAEHci4.js} +1 -1
- package/dist/client/assets/index-CIiYC99Z.js +25 -0
- package/dist/client/assets/{index-fVdZwXbQ.js → index-D41sOOsu.js} +1 -1
- package/dist/client/assets/{index-g9oC-3mV.js → index-Z8J_ZhrB.js} +1 -1
- package/dist/client/assets/{index-kxFCfKdx.js → index-_B-Zy6Ft.js} +11 -11
- package/dist/client/assets/{infiniteQueryObserver-Q9Ch1SlH.js → infiniteQueryObserver-ClA24B46.js} +1 -1
- package/dist/client/assets/{input-CJuUYj5Y.js → input-BmJPL4BI.js} +1 -1
- package/dist/client/assets/{layout-BdEZp7Lm.js → layout-CvrVUDjF.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DuVpM8xt.js → localstorage-keys-MeV98x1G.js} +1 -1
- package/dist/client/assets/{login-Baj4wuxy.js → login-Cs2s_xWf.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BCtnFmpv.js → mcp-oauth-CgjMwSlx.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DaxbgdWa.js → mcp-server-card--SVmhdJ1.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-C4n2ElKE.js → mcp-server-detail-DqaqSD1Q.js} +2 -2
- package/dist/client/assets/{members-C-QMSOdo.js → members-Dts2re8D.js} +1 -1
- package/dist/client/assets/{monaco-editor-1VMfvFaT.js → monaco-editor-Ci2wLYsh.js} +3 -3
- package/dist/client/assets/{monitoring-CyqwraZN.js → monitoring-CaZfmW0Q.js} +1 -1
- package/dist/client/assets/{oauth-callback-UvAveY4Q.js → oauth-callback-acp6ZocK.js} +1 -1
- package/dist/client/assets/{page-IMRDmGp_.js → page-DoNNAVdX.js} +1 -1
- package/dist/client/assets/{page-o9rm9dBG.js → page-bXauqv-x.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-DKtGxFhi.js → pin-to-sidebar-button-ifJVs08O.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DqfmD7Lv.js → plugin-empty-state-CWbIe83F.js} +1 -1
- package/dist/client/assets/{plugin-header-BfXGZdm2.js → plugin-header-7TA5fOyp.js} +1 -1
- package/dist/client/assets/{plugins-B-FlFz3o.js → plugins-CN6d57_A.js} +1 -1
- package/dist/client/assets/{popover-IWCGO-jB.js → popover-BxGwddD8.js} +1 -1
- package/dist/client/assets/{registry-utils-9nMczNLD.js → registry-utils-DHmN_pos.js} +1 -1
- package/dist/client/assets/{resizable-oTpquxsO.js → resizable-D0xXdhTy.js} +1 -1
- package/dist/client/assets/{resource-tabs-DNjaGx4N.js → resource-tabs-CwRDUiBP.js} +1 -1
- package/dist/client/assets/{select-6QIp3PPA.js → select-BXTCpGIQ.js} +1 -1
- package/dist/client/assets/{settings-DmEN7q-R.js → settings-C6Dqa5Et.js} +1 -1
- package/dist/client/assets/{shell-layout-f9QetI-r.js → shell-layout-CUc10bY4.js} +2 -2
- package/dist/client/assets/{spinner-CHfAw4LE.js → spinner-D6WnKjyH.js} +1 -1
- package/dist/client/assets/{switch-B8GiDtx0.js → switch-8LHCq2Hj.js} +1 -1
- package/dist/client/assets/{textarea-CO4qLNDj.js → textarea-D3xdiTt5.js} +1 -1
- package/dist/client/assets/{tool-set-selector-uL1FTDsj.js → tool-set-selector-CwwQf-wr.js} +1 -1
- package/dist/client/assets/{tools-list-BE1mq5Cn.js → tools-list-C1sy8VMK.js} +1 -1
- package/dist/client/assets/{tooltip-DPmy6Yc4.js → tooltip-CcGnpUG9.js} +1 -1
- package/dist/client/assets/{typewriter-title-D2-DYqDP.js → typewriter-title-CIq3P3GS.js} +1 -1
- package/dist/client/assets/{use-binding-Bpukv3gt.js → use-binding-DqImux8H.js} +1 -1
- package/dist/client/assets/use-collections-DGoeBGCb.js +1 -0
- package/dist/client/assets/{use-connection-ASBc3U14.js → use-connection-CfqFbPzC.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DlrAoyaQ.js → use-create-virtual-mcp-B_rx4Mku.js} +1 -1
- package/dist/client/assets/{use-list-state-ZDRP3zFW.js → use-list-state-HlmN6FmS.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DXLHacDq.js → use-mcp-prompts-C9Lw72bS.js} +1 -1
- package/dist/client/assets/{use-members-CTEqdwIL.js → use-members-DiT0EqR0.js} +1 -1
- package/dist/client/assets/{use-mobile-BuEGyUe0.js → use-mobile-nqgE3yx-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-hA9VwO-v.js → use-organization-settings-Dfijbjzn.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BR9Cj6JE.js → use-virtual-mcp-BDXCo80j.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-PQGptECD.js +1 -0
- package/dist/client/assets/{useMutation-ClL17OKX.js → useMutation-EHy22ute.js} +1 -1
- package/dist/client/assets/useQuery-CC8ASXOP.js +1 -0
- package/dist/client/assets/{value-CzHdinJY.js → value-B-yghnft.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B5HElat6.js → view-mode-toggle-_E7g25j5.js} +1 -1
- package/dist/client/assets/{workflow-Lt3GFUiP.js → workflow-XUbWzazz.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/card-D-ZcDLJM.js +0 -1
- package/dist/client/assets/circle-alert-CsGRs6FI.js +0 -1
- package/dist/client/assets/connect-ChWwgYE3.js +0 -1
- package/dist/client/assets/connection-detail-D9V3bixZ.js +0 -1
- package/dist/client/assets/constants-CuO4IXOK.js +0 -1
- package/dist/client/assets/index-BJd9JH52.js +0 -25
- package/dist/client/assets/use-collections-DWOZCISS.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CnqRaniP.js +0 -1
- package/dist/client/assets/useQuery-CVADJf0h.js +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{bx as Fc,r as F,c as ve,K as Qn,l as Ec,j as c,f as Go,a9 as Ic,u as Nn,bK as cs,h as Dc,e as $c,a8 as Qe,bu as mi,bL as kc,bM as Mc,bN as Ho,bO as Rc,aN as Bc,aO as Uc,S as Yo,m as hi,bz as Lc,a0 as Vc,a1 as Wc,az as zc,ae as qc,aj as Bt,ai as Tn,ah as Yt,bc as Kc,b6 as Gc,ay as Hc,aq as Yc,ax as Xc,o as Xo,ab as Jc,ac as Zc,s as Ae,k as us,_ as Qc,N as eu,bg as tu,d as nu,b as ru,i as iu}from"./index-_B-Zy6Ft.js";import{i as su,a as ou}from"./mcp-oauth-CgjMwSlx.js";import{p as au,E as lu,r as cu,e as Jo}from"./env-vars-editor-B_6HoX_e.js";import{I as uu,n as du,E as fu}from"./empty-state-xyVUwDeF.js";import{E as mu}from"./error-boundary-DPf94Kzk.js";import{u as Zo,a as Qo}from"./use-binding-DqImux8H.js";import{c as hu}from"./use-collections-DGoeBGCb.js";import{b as pi,a as ea}from"./use-connection-CfqFbPzC.js";import{u as pu}from"./constants-C8myDR0I.js";import{P as gu}from"./pin-to-sidebar-button-ifJVs08O.js";import{B as Wt,c as yu}from"./button-B3OIs7uK.js";import{i as xu}from"./File06-AJSjQ3A-.js";import{i as bu}from"./Key01-90vomEdz.js";import{i as yn}from"./Loading01-CI_v2_GN.js";import{V as vu}from"./layout-CvrVUDjF.js";import{B as ds}from"./badge-BQ9TMrj5.js";import{D as Su,a as wu,b as ju,c as fs}from"./dropdown-menu-FHEiqgML.js";import{F as ke,a as Ou,b as Me,d as Re,f as Be,c as st,e as vr}from"./form-BZ5I8G1V.js";import{I as ct}from"./input-BmJPL4BI.js";import{S as ta,a as na,b as ra,c as ia,d as Mt,e as sa}from"./select-BXTCpGIQ.js";import{i as ms,M as Au,e as Cu}from"./extract-connection-data-ChJHuI17.js";import{t as _u}from"./ChevronDown-CoATZn7-.js";import{i as gi}from"./CpuChip02-Bf5E5TF5.js";import{s as Sr,f as oa,d as aa,e as Nu}from"./registry-utils-DHmN_pos.js";import{i as Tu}from"./Terminal-RipBc1up.js";import{s as Pu}from"./Trash01-C3d1WEuz.js";import{b as Fu,a as Eu}from"./use-virtual-mcp-BDXCo80j.js";import{i as Iu}from"./Grid01-CJ22jDcg.js";import{s as la}from"./Plus-CQ_pQZI1.js";import{u as Du,R as $u,I as ku,a as Mu}from"./index-D41sOOsu.js";import"./constants-D2PsHWWd.js";import{R as hs,_ as _t}from"./index-BkAEHci4.js";import{V as Ru,M as Bu}from"./index-Z8J_ZhrB.js";function Uu(t,e){return Du({...t,queries:t.queries.map(n=>({...n,suspense:!0,throwOnError:Fc,enabled:!0,placeholderData:void 0}))},e)}const ca=({size:t=24,color:e="currentColor",...n})=>F.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},F.createElement("path",{d:"M2 10s2.005-2.732 3.634-4.362A9 9 0 1 1 12 21a9.004 9.004 0 0 1-8.648-6.5M2 10V4m0 6h6"}));ca.displayName="RefreshCcw01";const Lu=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Vu=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),ps=t=>{const e=Vu(t);return e.charAt(0).toUpperCase()+e.slice(1)},ua=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),Wu=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var zu={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"};const qu=F.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>F.createElement("svg",{ref:l,...zu,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:ua("lucide",i),...!s&&!Wu(a)&&{"aria-hidden":"true"},...a},[...o.map(([d,f])=>F.createElement(d,f)),...Array.isArray(s)?s:[s]]));const Ye=(t,e)=>{const n=F.forwardRef(({className:r,...i},s)=>F.createElement(qu,{ref:s,iconNode:e,className:ua(`lucide-${Lu(ps(t))}`,`lucide-${t}`,r),...i}));return n.displayName=ps(t),n};const Ku=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gu=Ye("check",Ku);const Hu=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],da=Ye("chevron-down",Hu);const Yu=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Xu=Ye("chevron-up",Yu);const Ju=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Zu=Ye("circle-alert",Ju);const Qu=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],fa=Ye("circle-plus",Qu);const ed=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],td=Ye("circle",ed);const nd=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],rd=Ye("copy",nd);const id=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],sd=Ye("search",id);const od=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ad=Ye("trash-2",od);const ld=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ma=Ye("x",ld);function Qw(t){const e=ve.c(9),{connectionId:n}=t;let r,i,s;e[0]!==n?(r=new URL(`/mcp/${n}`,window.location.origin),s=Ec,i=Qn.isMCPAuthenticated(r.href,null),e[0]=n,e[1]=r,e[2]=i,e[3]=s):(r=e[1],i=e[2],s=e[3]);let o;e[4]!==r?(o=()=>su({url:r.href,token:null}),e[4]=r,e[5]=o):o=e[5];let a;e[6]!==i||e[7]!==o?(a={queryKey:i,queryFn:o},e[6]=i,e[7]=o,e[8]=a):a=e[8];const{data:l}=s(a);return l}const Un=43200,gs=1440,ys=Symbol.for("constructDateFrom");function yi(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&ys in t?t[ys](e):t instanceof Date?new t.constructor(e):new Date(e)}function pt(t,e){return yi(t,t)}let cd={};function ud(){return cd}function xs(t){const e=pt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function xi(t,...e){const n=yi.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function qn(t,e){const n=+pt(t)-+pt(e);return n<0?-1:n>0?1:n}function dd(t){return yi(t,Date.now())}function fd(t,e,n){const[r,i]=xi(n?.in,t,e),s=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return s*12+o}function md(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function hd(t,e){return+pt(t)-+pt(e)}function pd(t,e){const n=pt(t);return n.setHours(23,59,59,999),n}function gd(t,e){const n=pt(t),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function yd(t,e){const n=pt(t);return+pd(n)==+gd(n)}function xd(t,e,n){const[r,i,s]=xi(n?.in,t,t,e),o=qn(i,s),a=Math.abs(fd(i,s));if(a<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*a);let l=qn(i,s)===-o;yd(r)&&a===1&&qn(r,s)===1&&(l=!1);const d=o*(a-+l);return d===0?0:d}function bd(t,e,n){const r=hd(t,e)/1e3;return md(n?.roundingMethod)(r)}const vd={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Sd=(t,e,n)=>{let r;const i=vd[t];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function wr(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const wd={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jd={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Od={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ad={date:wr({formats:wd,defaultWidth:"full"}),time:wr({formats:jd,defaultWidth:"full"}),dateTime:wr({formats:Od,defaultWidth:"full"})},Cd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_d=(t,e,n,r)=>Cd[t];function rn(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):o;i=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;i=t.values[a]||t.values[o]}const s=t.argumentCallback?t.argumentCallback(e):e;return i[s]}}const Nd={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Td={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Pd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fd={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ed={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Id={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Dd=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},$d={ordinalNumber:Dd,era:rn({values:Nd,defaultWidth:"wide"}),quarter:rn({values:Td,defaultWidth:"wide",argumentCallback:t=>t-1}),month:rn({values:Pd,defaultWidth:"wide"}),day:rn({values:Fd,defaultWidth:"wide"}),dayPeriod:rn({values:Ed,defaultWidth:"wide",formattingValues:Id,defaultFormattingWidth:"wide"})};function sn(t){return(e,n={})=>{const r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;const o=s[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?Md(a,u=>u.test(o)):kd(a,u=>u.test(o));let d;d=t.valueCallback?t.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function kd(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Md(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Rd(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const i=r[0],s=e.match(t.parsePattern);if(!s)return null;let o=t.valueCallback?t.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(i.length);return{value:o,rest:a}}}const Bd=/^(\d+)(th|st|nd|rd)?/i,Ud=/\d+/i,Ld={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vd={any:[/^b/i,/^(a|c)/i]},Wd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zd={any:[/1/i,/2/i,/3/i,/4/i]},qd={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kd={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gd={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Hd={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Yd={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Xd={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jd={ordinalNumber:Rd({matchPattern:Bd,parsePattern:Ud,valueCallback:t=>parseInt(t,10)}),era:sn({matchPatterns:Ld,defaultMatchWidth:"wide",parsePatterns:Vd,defaultParseWidth:"any"}),quarter:sn({matchPatterns:Wd,defaultMatchWidth:"wide",parsePatterns:zd,defaultParseWidth:"any",valueCallback:t=>t+1}),month:sn({matchPatterns:qd,defaultMatchWidth:"wide",parsePatterns:Kd,defaultParseWidth:"any"}),day:sn({matchPatterns:Gd,defaultMatchWidth:"wide",parsePatterns:Hd,defaultParseWidth:"any"}),dayPeriod:sn({matchPatterns:Yd,defaultMatchWidth:"any",parsePatterns:Xd,defaultParseWidth:"any"})},Zd={code:"en-US",formatDistance:Sd,formatLong:Ad,formatRelative:_d,localize:$d,match:Jd,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Qd(t,e,n){const r=ud(),i=n?.locale??r.locale??Zd,s=2520,o=qn(t,e);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:o}),[l,d]=xi(n?.in,...o>0?[e,t]:[t,e]),f=bd(d,l),u=(xs(d)-xs(l))/1e3,h=Math.round((f-u)/60);let y;if(h<2)return n?.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,a):f<10?i.formatDistance("lessThanXSeconds",10,a):f<20?i.formatDistance("lessThanXSeconds",20,a):f<40?i.formatDistance("halfAMinute",0,a):f<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):h===0?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",h,a);if(h<45)return i.formatDistance("xMinutes",h,a);if(h<90)return i.formatDistance("aboutXHours",1,a);if(h<gs){const m=Math.round(h/60);return i.formatDistance("aboutXHours",m,a)}else{if(h<s)return i.formatDistance("xDays",1,a);if(h<Un){const m=Math.round(h/gs);return i.formatDistance("xDays",m,a)}else if(h<Un*2)return y=Math.round(h/Un),i.formatDistance("aboutXMonths",y,a)}if(y=xd(d,l),y<12){const m=Math.round(h/Un);return i.formatDistance("xMonths",m,a)}else{const m=y%12,p=Math.trunc(y/12);return m<3?i.formatDistance("aboutXYears",p,a):m<9?i.formatDistance("overXYears",p,a):i.formatDistance("almostXYears",p+1,a)}}function ef(t,e){return Qd(t,dd(t),e)}function tf(t){const e=ve.c(13),{virtualMcp:n,org:r}=t;let i;e[0]!==r||e[1]!==n.id?(i={org:r,agentId:n.id},e[0]=r,e[1]=n.id,e[2]=i):i=e[2];let s;e[3]!==n.icon||e[4]!==n.title?(s=n.icon?c.jsx("img",{src:n.icon,alt:n.title,className:"w-8 h-8 rounded-md object-cover shrink-0"}):c.jsx("div",{className:"w-8 h-8 rounded-md bg-primary/10 flex items-center justify-center shrink-0",children:c.jsx(gi,{size:16,className:"text-primary"})}),e[3]=n.icon,e[4]=n.title,e[5]=s):s=e[5];let o;e[6]!==n.title?(o=c.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[6]=n.title,e[7]=o):o=e[7];let a;e[8]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(Iu,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[8]=a):a=e[8];let l;return e[9]!==i||e[10]!==s||e[11]!==o?(l=c.jsxs(Ic,{to:"/$org/agents/$agentId",params:i,className:"flex items-center gap-3 p-3 rounded-lg border border-border hover:bg-muted/50 transition-colors group",children:[s,o,a]}),e[9]=i,e[10]=s,e[11]=o,e[12]=l):l=e[12],l}function bs(t){const e=ve.c(20),{connectionId:n,connectionTitle:r,connectionDescription:i,connectionIcon:s,org:o,hasExistingVirtualMcps:a}=t,l=Go(),d=Eu();let f;e[0]!==d.create||e[1]!==i||e[2]!==s||e[3]!==n||e[4]!==r||e[5]!==l||e[6]!==o?(f=async()=>{const m=await d.create.mutateAsync({title:`${r} Agent`,description:i??null,icon:s??null,status:"active",tool_selection_mode:"inclusion",connections:[{connection_id:n,selected_tools:null,selected_resources:null,selected_prompts:null}]});l({to:"/$org/agents/$agentId",params:{org:o,agentId:m.id}})},e[0]=d.create,e[1]=i,e[2]=s,e[3]=n,e[4]=r,e[5]=l,e[6]=o,e[7]=f):f=e[7];const u=f;if(a){let m;e[8]!==d.create.isPending?(m=d.create.isPending?c.jsx(yn,{size:16,className:"animate-spin"}):c.jsx(la,{size:16}),e[8]=d.create.isPending,e[9]=m):m=e[9];let p;return e[10]!==d.create.isPending||e[11]!==u||e[12]!==m?(p=c.jsxs(Wt,{variant:"outline",size:"sm",className:"gap-1.5",onClick:u,disabled:d.create.isPending,children:[m,"Create another Agent"]}),e[10]=d.create.isPending,e[11]=u,e[12]=m,e[13]=p):p=e[13],p}let h;e[14]!==d.create.isPending?(h=d.create.isPending?c.jsx(yn,{size:20,className:"animate-spin"}):c.jsx(gi,{size:20}),e[14]=d.create.isPending,e[15]=h):h=e[15];let y;return e[16]!==d.create.isPending||e[17]!==u||e[18]!==h?(y=c.jsxs(Wt,{size:"lg",className:"gap-2 w-full",onClick:u,disabled:d.create.isPending,children:[h,"Create an agent"]}),e[16]=d.create.isPending,e[17]=u,e[18]=h,e[19]=y):y=e[19],y}function nf(t){const e=ve.c(26),{connectionId:n,connectionTitle:r,connectionDescription:i,connectionIcon:s,org:o}=t;let a;e[0]!==n?(a={filters:[{column:"connection_id",value:n}]},e[0]=n,e[1]=a):a=e[1];const l=Fu(a);if(!(l.length>0)){let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Use in your IDE"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Expose this connection via an Agent to use it in Cursor, VS Code, Claude Desktop, and other MCP-compatible tools."})]}),e[2]=p):p=e[2];let g;return e[3]!==i||e[4]!==s||e[5]!==n||e[6]!==r||e[7]!==o?(g=c.jsxs("div",{className:"p-5 flex flex-col gap-3",children:[p,c.jsx(bs,{connectionId:n,connectionTitle:r,connectionDescription:i,connectionIcon:s,org:o,hasExistingVirtualMcps:!1})]}),e[3]=i,e[4]=s,e[5]=n,e[6]=r,e[7]=o,e[8]=g):g=e[8],g}let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Agents"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection is used on the following agents."})]}),e[9]=f):f=e[9];let u;if(e[10]!==o||e[11]!==l){let p;e[13]!==o?(p=g=>c.jsx(tf,{virtualMcp:g,org:o},g.id),e[13]=o,e[14]=p):p=e[14],u=l.map(p),e[10]=o,e[11]=l,e[12]=u}else u=e[12];let h;e[15]!==u?(h=c.jsx("div",{className:"flex flex-col gap-2",children:u}),e[15]=u,e[16]=h):h=e[16];let y;e[17]!==i||e[18]!==s||e[19]!==n||e[20]!==r||e[21]!==o?(y=c.jsx(bs,{connectionId:n,connectionTitle:r,connectionDescription:i,connectionIcon:s,org:o,hasExistingVirtualMcps:!0}),e[17]=i,e[18]=s,e[19]=n,e[20]=r,e[21]=o,e[22]=y):y=e[22];let m;return e[23]!==h||e[24]!==y?(m=c.jsxs("div",{className:"p-5 flex flex-col gap-3",children:[f,h,y]}),e[23]=h,e[24]=y,e[25]=m):m=e[25],m}function rf({form:t,connection:e,hasOAuthToken:n,onReauthenticate:r,onRemoveOAuth:i}){const s=cs({control:t.control,name:"ui_type"}),o=cs({control:t.control,name:"connection_url"}),{stdioEnabled:a}=Dc(),l=(()=>{if(typeof o!="string"||!o)return!1;try{const h=new URL(o);return h.hostname==="api.githubcopilot.com"&&h.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),d=a||e.connection_type==="STDIO",f=e.connection_type==="VIRTUAL",u=f?au(e.connection_url):null;return f?c.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("span",{className:"text-sm font-medium",children:"Type"}),c.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[c.jsx(gi,{className:"w-4 h-4 text-muted-foreground"}),c.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),u&&c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("span",{className:"text-sm font-medium",children:"Virtual MCP ID"}),c.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:c.jsx("code",{className:"text-sm text-muted-foreground",children:u})})]})]}):c.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[c.jsx(ke,{control:t.control,name:"ui_type",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:"Type"}),c.jsxs(ta,{value:h.value,onValueChange:h.onChange,children:[c.jsx(Re,{children:c.jsx(na,{children:c.jsx(ra,{})})}),c.jsxs(ia,{children:[c.jsx(Mt,{value:"HTTP",children:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(Sr,{className:"w-4 h-4"}),"HTTP"]})}),c.jsx(Mt,{value:"SSE",children:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(Sr,{className:"w-4 h-4"}),"SSE"]})}),c.jsx(Mt,{value:"Websocket",children:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(Sr,{className:"w-4 h-4"}),"Websocket"]})}),d&&c.jsxs(c.Fragment,{children:[c.jsx(Mt,{value:"NPX",children:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(du,{className:"w-4 h-4"}),"NPX Package"]})}),c.jsx(Mt,{value:"STDIO",children:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(Tu,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),c.jsx(Be,{})]})}),s==="NPX"&&c.jsx(ke,{control:t.control,name:"npx_package",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:"NPM Package"}),c.jsx(Re,{children:c.jsx(ct,{placeholder:"@perplexity-ai/mcp-server",...h,value:h.value||"",className:"h-10 rounded-lg"})}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"The npm package to run with npx"}),c.jsx(Be,{})]})}),s==="STDIO"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsx(ke,{control:t.control,name:"stdio_command",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:"Command"}),c.jsx(Re,{children:c.jsx(ct,{placeholder:"node, bun, python...",...h,value:h.value||"",className:"h-10 rounded-lg"})}),c.jsx(Be,{})]})}),c.jsx(ke,{control:t.control,name:"stdio_args",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:"Arguments"}),c.jsx(Re,{children:c.jsx(ct,{placeholder:"arg1 arg2 --flag value",...h,value:h.value||"",className:"h-10 rounded-lg"})}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments (no quotes needed)"}),c.jsx(Be,{})]})})]}),c.jsx(ke,{control:t.control,name:"stdio_cwd",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:"Working Directory"}),c.jsx(Re,{children:c.jsx(ct,{placeholder:"/path/to/project (optional)",...h,value:h.value||"",className:"h-10 rounded-lg"})}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),c.jsx(Be,{})]})})]}),(s==="NPX"||s==="STDIO")&&c.jsx(ke,{control:t.control,name:"env_vars",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:"Environment Variables"}),c.jsx(Re,{children:c.jsx(lu,{value:h.value??[],onChange:h.onChange})}),c.jsx(Be,{})]})}),s!=="NPX"&&s!=="STDIO"&&c.jsxs(c.Fragment,{children:[c.jsx(ke,{control:t.control,name:"connection_url",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:"URL"}),c.jsx(Re,{children:c.jsx(ct,{placeholder:"https://example.com/mcp",...h,value:h.value??"",className:"h-10 rounded-lg"})}),c.jsx(Be,{})]})}),n?c.jsx("div",{className:"flex items-center gap-2",children:c.jsxs(Su,{children:[c.jsx(wu,{asChild:!0,children:c.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:c.jsxs(ds,{variant:"success",className:"gap-1.5",children:[c.jsx(ms,{size:12}),"Authenticated via OAuth",c.jsx(_u,{size:12})]})})}),c.jsxs(ju,{align:"start",children:[c.jsxs(fs,{onClick:r,children:[c.jsx(ca,{size:16}),"Re-authenticate"]}),c.jsxs(fs,{variant:"destructive",onClick:i,children:[c.jsx(Pu,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token?c.jsx("div",{className:"flex items-center",children:c.jsxs(ds,{variant:"secondary",className:"gap-1.5",children:[c.jsx(ms,{size:12}),"Token saved"]})}):null,c.jsx(ke,{control:t.control,name:"connection_token",render:({field:h})=>c.jsxs(Me,{className:"flex flex-col gap-2",children:[c.jsx(st,{className:"text-sm font-medium",children:l?"GitHub Personal Access Token":"Token"}),c.jsx(Re,{children:c.jsx(ct,{type:"password",placeholder:e.connection_token?"Enter new token to replace...":l?"Paste your GitHub PAT (no 'Bearer' prefix)":"Enter access token...",...h,value:h.value||"",className:"h-10 rounded-lg",disabled:n})}),n?c.jsx(vr,{children:"This connection uses OAuth for authentication. Manage access in the MCP Configuration panel."}):e.connection_token?c.jsx(vr,{children:"A token is already saved. Enter a new token to replace it."}):l?c.jsxs(vr,{children:["(!) GitHub's hosted MCP at"," ",c.jsx("code",{children:"api.githubcopilot.com/mcp"})," currently requires a Personal Access Token (PAT). Create one at"," ",c.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"}),". Mesh will send it as"," ",c.jsx("code",{children:"Authorization: Bearer <PAT>"}),"."]}):null,c.jsx(Be,{})]})})]})]})}function sf(t){const e=ve.c(33),{form:n,connection:r,hasOAuthToken:i,onReauthenticate:s,onRemoveOAuth:o}=t,{org:a}=Nn();let l;e[0]!==r.icon||e[1]!==r.title?(l=c.jsx(uu,{icon:r.icon,name:r.title,size:"lg",className:"shadow-sm"}),e[0]=r.icon,e[1]=r.title,e[2]=l):l=e[2];let d;e[3]!==n.control?(d=c.jsxs("div",{className:"flex flex-col",children:[c.jsx(ke,{control:n.control,name:"title",render:af}),c.jsx(ke,{control:n.control,name:"description",render:of})]}),e[3]=n.control,e[4]=d):d=e[4];let f;e[5]!==l||e[6]!==d?(f=c.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[l,d]}),e[5]=l,e[6]=d,e[7]=f):f=e[7];let u;e[8]!==r||e[9]!==n||e[10]!==i||e[11]!==s||e[12]!==o?(u=c.jsx(rf,{form:n,connection:r,hasOAuthToken:i,onReauthenticate:s,onRemoveOAuth:o}),e[8]=r,e[9]=n,e[10]=i,e[11]=s,e[12]=o,e[13]=u):u=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=c.jsx("span",{className:"flex-1 text-sm text-foreground",children:"Last Updated"}),e[14]=h):h=e[14];let y;e[15]!==r.updated_at?(y=r.updated_at?ef(new Date(r.updated_at),{addSuffix:!1}):"Unknown",e[15]=r.updated_at,e[16]=y):y=e[16];let m;e[17]!==y?(m=c.jsxs("div",{className:"flex items-center gap-4 p-5 border-b border-border",children:[h,c.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:y})]}),e[17]=y,e[18]=m):m=e[18];let p;e[19]!==r.description||e[20]!==r.icon||e[21]!==r.id||e[22]!==r.title||e[23]!==a.slug?(p=c.jsx(nf,{connectionId:r.id,connectionTitle:r.title,connectionDescription:r.description,connectionIcon:r.icon,org:a.slug}),e[19]=r.description,e[20]=r.icon,e[21]=r.id,e[22]=r.title,e[23]=a.slug,e[24]=p):p=e[24];let g;e[25]!==f||e[26]!==u||e[27]!==m||e[28]!==p?(g=c.jsxs("div",{className:"flex flex-col",children:[f,u,m,p]}),e[25]=f,e[26]=u,e[27]=m,e[28]=p,e[29]=g):g=e[29];let x;return e[30]!==n||e[31]!==g?(x=c.jsx(Ou,{...n,children:g}),e[30]=n,e[31]=g,e[32]=x):x=e[32],x}function of(t){const{field:e}=t;return c.jsxs(Me,{className:"w-full space-y-0",children:[c.jsx(Re,{children:c.jsx(ct,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),c.jsx(Be,{})]})}function af(t){const{field:e}=t;return c.jsxs(Me,{className:"w-full space-y-0",children:[c.jsx("div",{className:"flex items-center gap-2.5",children:c.jsx(Re,{children:c.jsx(ct,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Connection Name"})})}),c.jsx(Be,{})]})}function lf(t){return t.startsWith("@")?t:`@${t}`}function cf(t){const e=t._meta?.[Au]?.tools;if(!(!e||e.length===0))return e.map(n=>({name:n.name,inputSchema:n.inputSchema??void 0,outputSchema:n.outputSchema??void 0}))}function uf(t){const{org:e}=Nn(),n=pi(),r=Zo(n),i=t?lf(t):"",s=i?{where:{appName:i},includeTools:!0}:{},a=Uu({queries:r.map(d=>{const f=d.id,u=oa(d.tools)||"",h=JSON.stringify(s);return{queryKey:Qn.toolCall(f,u,h),queryFn:async()=>{if(!u||!i)return null;try{return(await aa(f,e.id,u,s))?.items?.[0]??null}catch{return null}},staleTime:300*1e3}})}).map(d=>d.data).find(d=>d!==null);return{bindingSchema:a?cf(a):void 0}}function df(t){return t.startsWith("@")?t:`@${t}`}function ff(){const{org:t}=Nn(),{data:e}=$c.useSession(),n=ea(),r=pi(),i=Zo(r);return{installByBinding:async o=>{if(!t||!e?.user?.id){Qe.error("Not authenticated");return}const a=df(o),d=(await Promise.all(i.map(async m=>{const p=oa(m.tools);if(!p)return null;try{const g=await aa(m.id,t.id,p,{where:{appName:a}});return Nu(g??[])[0]??null}catch{return null}}))).find(m=>m!==null);if(!d){Qe.error(`MCP Server not found in registry: ${o}`);return}const f=Cu(d,t.id,e.user.id),u=f.connection_type==="STDIO",h=!!f.connection_url,y=u&&f.connection_headers&&typeof f.connection_headers=="object"&&"command"in f.connection_headers;if(!h&&!y){Qe.error("This MCP Server cannot be connected: no connection method available");return}return await n.create.mutateAsync(f),{id:f.id,connection:f}},isInstalling:n.create.isPending}}function Y(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function mf(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Y(t.additionalItems)}function vs(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const et="__additional_property",er="additionalProperties",gt="allOf",J="anyOf",_e="const",or="default",bi="dependencies",hf="enum",xe="__errors",oe="$id",vi="if",zt="items",pf="_$junk_option_schema_id$_",Kn="$name",q="oneOf",Hr="patternProperties",te="properties",jr="readonly",ha="required",tr="submitButtonOptions",ce="$ref",cn="$schema",pa="root",ga="_",gf=["discriminator","propertyName"],Ss="formContext",yf="layoutGridLookupMap",Si="__rjsf_additionalProperties",ya="__rjsf_rootSchema",xf="ui:field",wi="ui:widget",dt="ui:options",Yr="ui:globalOptions",bf="https://json-schema.org/draft/2019-09/schema",Gn="https://json-schema.org/draft/2020-12/schema";function U(t={},e={}){return t?Object.keys(t).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=t[r];return r===wi&&Y(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===dt&&Y(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function xa(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=U(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var ba=typeof global=="object"&&global&&global.Object===Object&&global,vf=typeof self=="object"&&self&&self.Object===Object&&self,Xe=ba||vf||Function("return this")(),Ne=Xe.Symbol,va=Object.prototype,Sf=va.hasOwnProperty,wf=va.toString,on=Ne?Ne.toStringTag:void 0;function jf(t){var e=Sf.call(t,on),n=t[on];try{t[on]=void 0;var r=!0}catch{}var i=wf.call(t);return r&&(e?t[on]=n:delete t[on]),i}var Of=Object.prototype,Af=Of.toString;function Cf(t){return Af.call(t)}var _f="[object Null]",Nf="[object Undefined]",ws=Ne?Ne.toStringTag:void 0;function nt(t){return t==null?t===void 0?Nf:_f:ws&&ws in Object(t)?jf(t):Cf(t)}function Sa(t,e){return function(n){return t(e(n))}}var ar=Sa(Object.getPrototypeOf,Object);function Te(t){return t!=null&&typeof t=="object"}var Tf="[object Object]",Pf=Function.prototype,Ff=Object.prototype,wa=Pf.toString,Ef=Ff.hasOwnProperty,If=wa.call(Object);function yt(t){if(!Te(t)||nt(t)!=Tf)return!1;var e=ar(t);if(e===null)return!0;var n=Ef.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&wa.call(n)==If}function Xr(t){const e={[xe]:[],addError(n){this[xe].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:Xr(r)}),e);if(yt(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:Xr(n[i])}),e)}return e}function Df(){this.__data__=[],this.size=0}function Pn(t,e){return t===e||t!==t&&e!==e}function lr(t,e){for(var n=t.length;n--;)if(Pn(t[n][0],e))return n;return-1}var $f=Array.prototype,kf=$f.splice;function Mf(t){var e=this.__data__,n=lr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():kf.call(e,n,1),--this.size,!0}function Rf(t){var e=this.__data__,n=lr(e,t);return n<0?void 0:e[n][1]}function Bf(t){return lr(this.__data__,t)>-1}function Uf(t,e){var n=this.__data__,r=lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function rt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}rt.prototype.clear=Df;rt.prototype.delete=Mf;rt.prototype.get=Rf;rt.prototype.has=Bf;rt.prototype.set=Uf;function Lf(){this.__data__=new rt,this.size=0}function Vf(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Wf(t){return this.__data__.get(t)}function zf(t){return this.__data__.has(t)}function Z(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var qf="[object AsyncFunction]",Kf="[object Function]",Gf="[object GeneratorFunction]",Hf="[object Proxy]";function Fn(t){if(!Z(t))return!1;var e=nt(t);return e==Kf||e==Gf||e==qf||e==Hf}var Or=Xe["__core-js_shared__"],js=(function(){var t=/[^.]+$/.exec(Or&&Or.keys&&Or.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Yf(t){return!!js&&js in t}var Xf=Function.prototype,Jf=Xf.toString;function Nt(t){if(t!=null){try{return Jf.call(t)}catch{}try{return t+""}catch{}}return""}var Zf=/[\\^$.*+?()[\]{}|]/g,Qf=/^\[object .+?Constructor\]$/,em=Function.prototype,tm=Object.prototype,nm=em.toString,rm=tm.hasOwnProperty,im=RegExp("^"+nm.call(rm).replace(Zf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sm(t){if(!Z(t)||Yf(t))return!1;var e=Fn(t)?im:Qf;return e.test(Nt(t))}function om(t,e){return t?.[e]}function Tt(t,e){var n=om(t,e);return sm(n)?n:void 0}var xn=Tt(Xe,"Map"),bn=Tt(Object,"create");function am(){this.__data__=bn?bn(null):{},this.size=0}function lm(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var cm="__lodash_hash_undefined__",um=Object.prototype,dm=um.hasOwnProperty;function fm(t){var e=this.__data__;if(bn){var n=e[t];return n===cm?void 0:n}return dm.call(e,t)?e[t]:void 0}var mm=Object.prototype,hm=mm.hasOwnProperty;function pm(t){var e=this.__data__;return bn?e[t]!==void 0:hm.call(e,t)}var gm="__lodash_hash_undefined__";function ym(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bn&&e===void 0?gm:e,this}function Ot(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ot.prototype.clear=am;Ot.prototype.delete=lm;Ot.prototype.get=fm;Ot.prototype.has=pm;Ot.prototype.set=ym;function xm(){this.size=0,this.__data__={hash:new Ot,map:new(xn||rt),string:new Ot}}function bm(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function cr(t,e){var n=t.__data__;return bm(e)?n[typeof e=="string"?"string":"hash"]:n.map}function vm(t){var e=cr(this,t).delete(t);return this.size-=e?1:0,e}function Sm(t){return cr(this,t).get(t)}function wm(t){return cr(this,t).has(t)}function jm(t,e){var n=cr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function it(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}it.prototype.clear=xm;it.prototype.delete=vm;it.prototype.get=Sm;it.prototype.has=wm;it.prototype.set=jm;var Om=200;function Am(t,e){var n=this.__data__;if(n instanceof rt){var r=n.__data__;if(!xn||r.length<Om-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new it(r)}return n.set(t,e),this.size=n.size,this}function Ee(t){var e=this.__data__=new rt(t);this.size=e.size}Ee.prototype.clear=Lf;Ee.prototype.delete=Vf;Ee.prototype.get=Wf;Ee.prototype.has=zf;Ee.prototype.set=Am;var Cm="__lodash_hash_undefined__";function _m(t){return this.__data__.set(t,Cm),this}function Nm(t){return this.__data__.has(t)}function At(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new it;++e<n;)this.add(t[e])}At.prototype.add=At.prototype.push=_m;At.prototype.has=Nm;function Tm(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function vn(t,e){return t.has(e)}var Pm=1,Fm=2;function ja(t,e,n,r,i,s){var o=n&Pm,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var d=s.get(t),f=s.get(e);if(d&&f)return d==e&&f==t;var u=-1,h=!0,y=n&Fm?new At:void 0;for(s.set(t,e),s.set(e,t);++u<a;){var m=t[u],p=e[u];if(r)var g=o?r(p,m,u,e,t,s):r(m,p,u,t,e,s);if(g!==void 0){if(g)continue;h=!1;break}if(y){if(!Tm(e,function(x,S){if(!vn(y,S)&&(m===x||i(m,x,n,r,s)))return y.push(S)})){h=!1;break}}else if(!(m===p||i(m,p,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}var nr=Xe.Uint8Array;function Em(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function ji(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Im=1,Dm=2,$m="[object Boolean]",km="[object Date]",Mm="[object Error]",Rm="[object Map]",Bm="[object Number]",Um="[object RegExp]",Lm="[object Set]",Vm="[object String]",Wm="[object Symbol]",zm="[object ArrayBuffer]",qm="[object DataView]",Os=Ne?Ne.prototype:void 0,Ar=Os?Os.valueOf:void 0;function Km(t,e,n,r,i,s,o){switch(n){case qm:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case zm:return!(t.byteLength!=e.byteLength||!s(new nr(t),new nr(e)));case $m:case km:case Bm:return Pn(+t,+e);case Mm:return t.name==e.name&&t.message==e.message;case Um:case Vm:return t==e+"";case Rm:var a=Em;case Lm:var l=rℑif(a||(a=ji),t.size!=e.size&&!l)return!1;var d=o.get(t);if(d)return d==e;r|=Dm,o.set(t,e);var f=ja(a(t),a(e),r,i,s,o);return o.delete(t),f;case Wm:if(Ar)return Ar.call(t)==Ar.call(e)}return!1}function Oi(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var ye=Array.isArray;function Oa(t,e,n){var r=e(t);return ye(t)?r:Oi(r,n(t))}function Gm(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Aa(){return[]}var Hm=Object.prototype,Ym=Hm.propertyIsEnumerable,As=Object.getOwnPropertySymbols,Ai=As?function(t){return t==null?[]:(t=Object(t),Gm(As(t),function(e){return Ym.call(t,e)}))}:Aa;function Ca(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Xm="[object Arguments]";function Cs(t){return Te(t)&&nt(t)==Xm}var _a=Object.prototype,Jm=_a.hasOwnProperty,Zm=_a.propertyIsEnumerable,qt=Cs((function(){return arguments})())?Cs:function(t){return Te(t)&&Jm.call(t,"callee")&&!Zm.call(t,"callee")};function Qm(){return!1}var Na=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_s=Na&&typeof module=="object"&&module&&!module.nodeType&&module,eh=_s&&_s.exports===Na,Ns=eh?Xe.Buffer:void 0,th=Ns?Ns.isBuffer:void 0,Ct=th||Qm,nh=9007199254740991,rh=/^(?:0|[1-9]\d*)$/;function ur(t,e){var n=typeof t;return e=e??nh,!!e&&(n=="number"||n!="symbol"&&rh.test(t))&&t>-1&&t%1==0&&t<e}var ih=9007199254740991;function Ci(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ih}var sh="[object Arguments]",oh="[object Array]",ah="[object Boolean]",lh="[object Date]",ch="[object Error]",uh="[object Function]",dh="[object Map]",fh="[object Number]",mh="[object Object]",hh="[object RegExp]",ph="[object Set]",gh="[object String]",yh="[object WeakMap]",xh="[object ArrayBuffer]",bh="[object DataView]",vh="[object Float32Array]",Sh="[object Float64Array]",wh="[object Int8Array]",jh="[object Int16Array]",Oh="[object Int32Array]",Ah="[object Uint8Array]",Ch="[object Uint8ClampedArray]",_h="[object Uint16Array]",Nh="[object Uint32Array]",ue={};ue[vh]=ue[Sh]=ue[wh]=ue[jh]=ue[Oh]=ue[Ah]=ue[Ch]=ue[_h]=ue[Nh]=!0;ue[sh]=ue[oh]=ue[xh]=ue[ah]=ue[bh]=ue[lh]=ue[ch]=ue[uh]=ue[dh]=ue[fh]=ue[mh]=ue[hh]=ue[ph]=ue[gh]=ue[yh]=!1;function Th(t){return Te(t)&&Ci(t.length)&&!!ue[nt(t)]}function _i(t){return function(e){return t(e)}}var Ta=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fn=Ta&&typeof module=="object"&&module&&!module.nodeType&&module,Ph=fn&&fn.exports===Ta,Cr=Ph&&ba.process,Kt=(function(){try{var t=fn&&fn.require&&fn.require("util").types;return t||Cr&&Cr.binding&&Cr.binding("util")}catch{}})(),Ts=Kt&&Kt.isTypedArray,En=Ts?_i(Ts):Th,Fh=Object.prototype,Eh=Fh.hasOwnProperty;function Pa(t,e){var n=ye(t),r=!n&&qt(t),i=!n&&!r&&Ct(t),s=!n&&!r&&!i&&En(t),o=n||r||i||s,a=o?Ca(t.length,String):[],l=a.length;for(var d in t)(e||Eh.call(t,d))&&!(o&&(d=="length"||i&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||ur(d,l)))&&a.push(d);return a}var Ih=Object.prototype;function dr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Ih;return t===n}var Dh=Sa(Object.keys,Object),$h=Object.prototype,kh=$h.hasOwnProperty;function Fa(t){if(!dr(t))return Dh(t);var e=[];for(var n in Object(t))kh.call(t,n)&&n!="constructor"&&e.push(n);return e}function Pt(t){return t!=null&&Ci(t.length)&&!Fn(t)}function Fe(t){return Pt(t)?Pa(t):Fa(t)}function Jr(t){return Oa(t,Fe,Ai)}var Mh=1,Rh=Object.prototype,Bh=Rh.hasOwnProperty;function Uh(t,e,n,r,i,s){var o=n&Mh,a=Jr(t),l=a.length,d=Jr(e),f=d.length;if(l!=f&&!o)return!1;for(var u=l;u--;){var h=a[u];if(!(o?h in e:Bh.call(e,h)))return!1}var y=s.get(t),m=s.get(e);if(y&&m)return y==e&&m==t;var p=!0;s.set(t,e),s.set(e,t);for(var g=o;++u<l;){h=a[u];var x=t[h],S=e[h];if(r)var O=o?r(S,x,h,e,t,s):r(x,S,h,t,e,s);if(!(O===void 0?x===S||i(x,S,n,r,s):O)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var b=t.constructor,v=e.constructor;b!=v&&"constructor"in t&&"constructor"in e&&!(typeof b=="function"&&b instanceof b&&typeof v=="function"&&v instanceof v)&&(p=!1)}return s.delete(t),s.delete(e),p}var Zr=Tt(Xe,"DataView"),Qr=Tt(Xe,"Promise"),Lt=Tt(Xe,"Set"),ei=Tt(Xe,"WeakMap"),Ps="[object Map]",Lh="[object Object]",Fs="[object Promise]",Es="[object Set]",Is="[object WeakMap]",Ds="[object DataView]",Vh=Nt(Zr),Wh=Nt(xn),zh=Nt(Qr),qh=Nt(Lt),Kh=Nt(ei),Ce=nt;(Zr&&Ce(new Zr(new ArrayBuffer(1)))!=Ds||xn&&Ce(new xn)!=Ps||Qr&&Ce(Qr.resolve())!=Fs||Lt&&Ce(new Lt)!=Es||ei&&Ce(new ei)!=Is)&&(Ce=function(t){var e=nt(t),n=e==Lh?t.constructor:void 0,r=n?Nt(n):"";if(r)switch(r){case Vh:return Ds;case Wh:return Ps;case zh:return Fs;case qh:return Es;case Kh:return Is}return e});var Gh=1,$s="[object Arguments]",ks="[object Array]",Ln="[object Object]",Hh=Object.prototype,Ms=Hh.hasOwnProperty;function Yh(t,e,n,r,i,s){var o=ye(t),a=ye(e),l=o?ks:Ce(t),d=a?ks:Ce(e);l=l==$s?Ln:l,d=d==$s?Ln:d;var f=l==Ln,u=d==Ln,h=l==d;if(h&&Ct(t)){if(!Ct(e))return!1;o=!0,f=!1}if(h&&!f)return s||(s=new Ee),o||En(t)?ja(t,e,n,r,i,s):Km(t,e,l,n,r,i,s);if(!(n&Gh)){var y=f&&Ms.call(t,"__wrapped__"),m=u&&Ms.call(e,"__wrapped__");if(y||m){var p=y?t.value():t,g=m?e.value():e;return s||(s=new Ee),i(p,g,n,r,s)}}return h?(s||(s=new Ee),Uh(t,e,n,r,i,s)):!1}function In(t,e,n,r,i){return t===e?!0:t==null||e==null||!Te(t)&&!Te(e)?t!==t&&e!==e:Yh(t,e,n,r,In,i)}function Xh(t,e,n){n=typeof n=="function"?n:void 0;var r=n?n(t,e):void 0;return r===void 0?In(t,e,void 0,n):!!r}function le(t,e){return Xh(t,e,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}var Jh="[object Symbol]";function Dn(t){return typeof t=="symbol"||Te(t)&&nt(t)==Jh}var Zh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qh=/^\w*$/;function Ni(t,e){if(ye(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Dn(t)?!0:Qh.test(t)||!Zh.test(t)||e!=null&&t in Object(e)}var ep="Expected a function";function Ti(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ep);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Ti.Cache||it),n}Ti.Cache=it;var tp=500;function np(t){var e=Ti(t,function(r){return n.size===tp&&n.clear(),r}),n=e.cache;return e}var rp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ip=/\\(\\)?/g,Ea=np(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(rp,function(n,r,i,s){e.push(i?s.replace(ip,"$1"):r||n)}),e});function Xt(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Rs=Ne?Ne.prototype:void 0,Bs=Rs?Rs.toString:void 0;function Ia(t){if(typeof t=="string")return t;if(ye(t))return Xt(t,Ia)+"";if(Dn(t))return Bs?Bs.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Pi(t){return t==null?"":Ia(t)}function Jt(t,e){return ye(t)?t:Ni(t,e)?[t]:Ea(Pi(t))}function Ft(t){if(typeof t=="string"||Dn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function fr(t,e){e=Jt(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Ft(e[n++])];return n&&n==r?t:void 0}function I(t,e,n){var r=t==null?void 0:fr(t,e);return r===void 0?n:r}var sp=Object.prototype,op=sp.hasOwnProperty;function ap(t,e){return t!=null&&op.call(t,e)}function Da(t,e,n){e=Jt(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=Ft(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&Ci(i)&&ur(o,i)&&(ye(t)||qt(t)))}function X(t,e){return t!=null&&Da(t,e,ap)}function ft(t,e){return In(t,e)}var rr=(function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function Fi(t,e,n){e=="__proto__"&&rr?rr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var lp=Object.prototype,cp=lp.hasOwnProperty;function Ei(t,e,n){var r=t[e];(!(cp.call(t,e)&&Pn(r,n))||n===void 0&&!(e in t))&&Fi(t,e,n)}function Ii(t,e,n,r){if(!Z(t))return t;e=Jt(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=Ft(e[i]),d=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var f=a[l];d=r?r(f,l,a):void 0,d===void 0&&(d=Z(f)?f:ur(e[i+1])?[]:{})}Ei(a,l,d),a=a[l]}return t}function se(t,e,n){return t==null?t:Ii(t,e,n)}function mr(t){return t}function $a(t){return typeof t=="function"?t:mr}var up=/\s/;function dp(t){for(var e=t.length;e--&&up.test(t.charAt(e)););return e}var fp=/^\s+/;function mp(t){return t&&t.slice(0,dp(t)+1).replace(fp,"")}var Us=NaN,hp=/^[-+]0x[0-9a-f]+$/i,pp=/^0b[01]+$/i,gp=/^0o[0-7]+$/i,yp=parseInt;function xp(t){if(typeof t=="number")return t;if(Dn(t))return Us;if(Z(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Z(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=mp(t);var n=pp.test(t);return n||gp.test(t)?yp(t.slice(2),n?2:8):hp.test(t)?Us:+t}var Ls=1/0,bp=17976931348623157e292;function vp(t){if(!t)return t===0?t:0;if(t=xp(t),t===Ls||t===-Ls){var e=t<0?-1:1;return e*bp}return t===t?t:0}function ka(t){var e=vp(t),n=e%1;return e===e?n?e-n:e:0}var Sp=9007199254740991,_r=4294967295,wp=Math.min;function Ma(t,e){if(t=ka(t),t<1||t>Sp)return[];var n=_r,r=wp(t,_r);e=$a(e),t-=_r;for(var i=Ca(r,e);++n<t;)e(n);return i}function Di(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Vs=Object.create,Ra=(function(){function t(){}return function(e){if(!Z(e))return{};if(Vs)return Vs(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function jp(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var Ba=jp();function Ua(t,e){return t&&Ba(t,e,Fe)}var Op=1,Ap=2;function Cp(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],d=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var f=new Ee,u;if(!(u===void 0?In(d,l,Op|Ap,r,f):u))return!1}}return!0}function La(t){return t===t&&!Z(t)}function _p(t){for(var e=Fe(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,La(i)]}return e}function Va(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Np(t){var e=_p(t);return e.length==1&&e[0][2]?Va(e[0][0],e[0][1]):function(n){return n===t||Cp(n,t,e)}}function Tp(t,e){return t!=null&&e in Object(t)}function Wa(t,e){return t!=null&&Da(t,e,Tp)}var Pp=1,Fp=2;function Ep(t,e){return Ni(t)&&La(e)?Va(Ft(t),e):function(n){var r=I(n,t);return r===void 0&&r===e?Wa(n,t):In(e,r,Pp|Fp)}}function Ip(t){return function(e){return e?.[t]}}function Dp(t){return function(e){return fr(e,t)}}function $p(t){return Ni(t)?Ip(Ft(t)):Dp(t)}function $i(t){return typeof t=="function"?t:t==null?mr:typeof t=="object"?ye(t)?Ep(t[0],t[1]):Np(t):$p(t)}function kp(t,e,n){var r=ye(t),i=r||Ct(t)||En(t);if(e=$i(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:Z(t)?n=Fn(s)?Ra(ar(t)):{}:n={}}return(i?Di:Ua)(t,function(o,a,l){return e(n,o,a,l)}),n}function ti(t,e,n){(n!==void 0&&!Pn(t[e],n)||n===void 0&&!(e in t))&&Fi(t,e,n)}var za=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ws=za&&typeof module=="object"&&module&&!module.nodeType&&module,Mp=Ws&&Ws.exports===za,zs=Mp?Xe.Buffer:void 0,qs=zs?zs.allocUnsafe:void 0;function qa(t,e){if(e)return t.slice();var n=t.length,r=qs?qs(n):new t.constructor(n);return t.copy(r),r}function ki(t){var e=new t.constructor(t.byteLength);return new nr(e).set(new nr(t)),e}function Ka(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Mi(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Ga(t){return typeof t.constructor=="function"&&!dr(t)?Ra(ar(t)):{}}function Sn(t){return Te(t)&&Pt(t)}function ni(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Zt(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?Fi(n,a,l):Ei(n,a,l)}return n}function Rp(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var Bp=Object.prototype,Up=Bp.hasOwnProperty;function Lp(t){if(!Z(t))return Rp(t);var e=dr(t),n=[];for(var r in t)r=="constructor"&&(e||!Up.call(t,r))||n.push(r);return n}function $n(t){return Pt(t)?Pa(t,!0):Lp(t)}function Vp(t){return Zt(t,$n(t))}function Wp(t,e,n,r,i,s,o){var a=ni(t,n),l=ni(e,n),d=o.get(l);if(d){ti(t,n,d);return}var f=s?s(a,l,n+"",t,e,o):void 0,u=f===void 0;if(u){var h=ye(l),y=!h&&Ct(l),m=!h&&!y&&En(l);f=l,h||y||m?ye(a)?f=a:Sn(a)?f=Mi(a):y?(u=!1,f=qa(l,!0)):m?(u=!1,f=Ka(l,!0)):f=[]:yt(l)||qt(l)?(f=a,qt(a)?f=Vp(a):(!Z(a)||Fn(a))&&(f=Ga(l))):u=!1}u&&(o.set(l,f),i(f,l,r,s,o),o.delete(l)),ti(t,n,f)}function Ha(t,e,n,r,i){t!==e&&Ba(e,function(s,o){if(i||(i=new Ee),Z(s))Wp(t,e,o,n,Ha,r,i);else{var a=r?r(ni(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),ti(t,o,a)}},$n)}function zp(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Ks=Math.max;function Ya(t,e,n){return e=Ks(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Ks(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),zp(t,this,a)}}function qp(t){return function(){return t}}var Kp=rr?function(t,e){return rr(t,"toString",{configurable:!0,enumerable:!1,value:qp(e),writable:!0})}:mr,Gp=800,Hp=16,Yp=Date.now;function Xp(t){var e=0,n=0;return function(){var r=Yp(),i=Hp-(r-n);if(n=r,i>0){if(++e>=Gp)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Xa=Xp(Kp);function hr(t,e){return Xa(Ya(t,e,mr),t+"")}function Jp(t,e,n){if(!Z(n))return!1;var r=typeof e;return(r=="number"?Pt(n)&&ur(e,n.length):r=="string"&&e in n)?Pn(n[e],t):!1}function Zp(t){return hr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&Jp(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var Qp=Zp(function(t,e,n){Ha(t,e,n)}),Gs=Ne?Ne.isConcatSpreadable:void 0;function eg(t){return ye(t)||qt(t)||!!(Gs&&t&&t[Gs])}function kn(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=eg),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?kn(a,e-1,n,r,i):Oi(i,a):r||(i[i.length]=a)}return i}var tg=1/0;function ng(t){var e=t==null?0:t.length;return e?kn(t,tg):[]}function rg(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function ig(t){return t!==t}function sg(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Ja(t,e,n){return e===e?sg(t,e,n):rg(t,ig,n)}function Ri(t,e){var n=t==null?0:t.length;return!!n&&Ja(t,e,0)>-1}function Hn(){}var og=1/0,ag=Lt&&1/ji(new Lt([,-0]))[1]==og?function(t){return new Lt(t)}:Hn,lg=200;function Za(t,e,n){var r=-1,i=Ri,s=t.length,o=!0,a=[],l=a;if(s>=lg){var d=ag(t);if(d)return ji(d);o=!1,i=vn,l=new At}else l=a;e:for(;++r<s;){var f=t[r],u=f;if(f=f!==0?f:0,o&&u===u){for(var h=l.length;h--;)if(l[h]===u)continue e;a.push(f)}else i(l,u,n)||(l!==a&&l.push(u),a.push(f))}return a}function Qa(t){return t&&t.length?Za(t):[]}var cg="[object Map]",ug="[object Set]",dg=Object.prototype,fg=dg.hasOwnProperty;function me(t){if(t==null)return!0;if(Pt(t)&&(ye(t)||typeof t=="string"||typeof t.splice=="function"||Ct(t)||En(t)||qt(t)))return!t.length;var e=Ce(t);if(e==cg||e==ug)return!t.size;if(dr(t))return!Fa(t).length;for(var n in t)if(fg.call(t,n))return!1;return!0}const mg=Object.prototype;function un(t){for(const e in t)if(mg.hasOwnProperty.call(t,e))return!1;return!0}const hg=["array","boolean","integer","null","number","object","string"];new Set(hg);const pg=["$defs","definitions","properties","patternProperties","dependencies"];new Set(pg);const gg=["items","allOf","oneOf","anyOf"];new Set(gg);const yg=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(yg);function Yn(t){return typeof t=="object"}function Le(t){return Yn(t)?un(t):t===!0}function Ut(t,e){return t<e?-1:t>e?1:0}function Nr(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function xg(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function Hs(t){return t.length===0}function Tr(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function el(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){const o=[];let a=0;e:for(let l=0;l<r;l++){const d=n[l];for(let f=0;f<a;f++)if(t(d,o[f])===0)continue e;a=o.push(d)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function bg(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const f=e;e=n,n=f;const u=i;i=s,s=u}const o=[...e].sort(t),a=[...n].sort(t);let l=0,d=0;for(;l<i&&d<s;){const f=t(o[l],a[d]);f===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,d++):f<0?l++:d++}return r}}function vg(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const Ys=vg,tl=()=>0,Sg=t=>t===void 0,wg=t=>typeof t!="object",Xs={boolean:0,number:1,string:2};function jg(t,e){const n=typeof t,r=typeof e;return n===r?Ut(t,e):Xs[n]-Xs[r]}function Og(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function pr(t,e,n=tl){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Rt(t){return pr(Sg,t)}function at(t,e){return pr(n=>n===void 0||t(n),e)}function Pr(t,e){return pr(Array.isArray,t,e)}const he=Rt(Ut),Fr=at(t=>t===0,(t,e)=>t-e);function Ag({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=Ys(e,p=>Object.keys(p).sort());function r(p){return(g,x)=>{const S=n(g),O=n(x),b=Math.min(S.length,O.length);for(let v=0;v<b;v++){const w=Ut(S[v],O[v]);if(w!==0)return w}if(S.length!==O.length)return S.length-O.length;for(let v=0;v<b;v++){const w=S[v],j=p(g[w],x[w]);if(j!==0)return j}return 0}}function i(p){const g=Tr(p),x=Ys(t,el(p,{threshold:0}));return(S,O)=>g(x(S),x(O))}const s=i(Ut);function o(p,g){if(Yn(p)){if(Yn(g)){const x=Object.keys(p),S=Object.keys(g),O=Og(x,S),b=O.length;for(let v=0;v<b;v++){const w=O[v];if(p[w]===g[w])continue;const A=(m[w]??a)(p[w],g[w]);if(A!==0)return A}return 0}return g===!0&&un(p)?0:1}return Yn(g)?p===!0&&un(g)?0:-1:Ut(p,g)}const a=Rt(d),l=pr(wg,Pr(r(a),Tr(d)),jg);function d(p,g){return p===null?-1:g===null?1:l(p,g)}const f=Rt(o),u=at(un,r(f)),h=Rt(i(o)),y=at(Le,o),m={$id:he,$comment:he,$defs:u,$ref:he,$schema:he,const:a,contains:f,contentEncoding:he,contentMediaType:he,default:a,definitions:u,description:he,else:f,examples:a,exclusiveMaximum:he,exclusiveMinimum:he,format:he,if:f,maximum:he,maxItems:he,maxLength:he,maxProperties:he,minimum:he,multipleOf:he,not:f,pattern:he,propertyNames:f,readOnly:he,then:f,title:he,writeOnly:he,uniqueItems:at(p=>p===!1,tl),minLength:Fr,minItems:Fr,minProperties:Fr,required:at(Hs,s),enum:at(Hs,i(d)),type:Rt((p,g)=>{const x=Array.isArray(p),S=Array.isArray(g);return!x&&!S?Ut(p,g):s(x?p:[p],S?g:[g])}),items:at(p=>!Array.isArray(p)&&Le(p),Pr(o,Tr(o))),anyOf:h,allOf:h,oneOf:h,properties:u,patternProperties:u,additionalProperties:y,additionalItems:y,dependencies:at(un,r(Rt(Pr(o,s))))};return{compareSchemaValues:d,compareSchemaDefinitions:o}}function Js(t){return t}const nl=(t,e)=>t?nl(e%t,t):e,Cg=(t,e)=>Math.abs(t*e)/nl(t,e);function _g(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function*Er(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)yield n(o,e[a])}}function Ir(t,e){return t||e}function Zs(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function Ng(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function vt(t,e,n){n===void 0||Le(n)?delete t[e]:t[e]=n}const Tg=["properties","patternProperties","additionalProperties"];function Qs(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const eo=[[],[]];function to(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const Pg=["items","additionalItems"],Fg=["if","then","else"];function no(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function Dr(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function St(t,e,n){return[t,e,n]}function Eg(t){const e=new Map;for(const[n,r,i]of t){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const Ig=[St("minimum","maximum",t=>t.maximum>=t.minimum),St("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),St("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),St("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),St("minLength","maxLength",t=>t.maxLength>=t.minLength),St("minItems","maxItems",t=>t.maxItems>=t.minItems),St("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function Dg({mergePatterns:t=_g,isSubRegExp:e=Object.is,intersectJson:n=xg,deduplicateJsonSchemaDef:r=Js,defaultMerger:i=Js,assigners:s=[],checks:o=Ig,mergers:a}={}){function l(b){const v=b.length;let w=b[0];for(let j=1;j<v;j++){const A=x(w,b[j]);if(A===!1)return!1;Le(A)||(w=A)}return w}function d(b,v,w,j,A,C,T){if(b.length=0,w===!1)return!1;if(b.push(w),A!==void 0){if(A===!1)return!1;b.push(A)}if(to(b,v,C))return!1;const _=b.length<2;if(T===!1){if(_)return;if(to(b,v,j))return!1}else _&&T!==void 0&&b.push(T);return b.length===1?b[0]:l(b)}function f(b,v,w,j,A,C){const T=w.length;if(T>0&&A!==!1)if(C)Object.assign(b,v);else for(let N=0;N<T;N++){const _=w[N];j.has(_)||(b[_]=x(v[_],A))}return b}const u=(b,{properties:v={},patternProperties:w,additionalProperties:j=!0},{properties:A={},patternProperties:C,additionalProperties:T=!0})=>{const N=Le(j),_=Le(T);if(N&&_)return vt(b,"properties",S(v,A)),vt(b,"patternProperties",w&&C?S(w,C):w??C),delete b.additionalProperties,b;const P=x(j,T);vt(b,"additionalProperties",P);const $={},E=Object.keys(v),D=E.length,[M,k]=w?Qs(w):eo,[B,W]=C?Qs(C):eo,R=[],V=new Set,Q=_?void 0:T;for(let H=0;H<D;H++){const re=E[H];V.add(re);const fe=d(R,re,v[re],M,A[re],B,Q);fe!==void 0&&($[re]=fe)}const ne=Object.keys(A),ie=ne.length,de=N?void 0:j;for(let H=0;H<ie;H++){const re=ne[H];if(V.has(re))continue;const fe=d(R,re,A[re],B,void 0,M,de);fe!==void 0&&($[re]=fe)}vt(b,"properties",$);let ee={};const z=new Set;if(k.length>0&&W.length>0){const H=Er(k,W,(re,fe)=>{e(re,fe)&&z.add(re),e(fe,re)&&z.add(fe),ee[t(re,fe)]=x(w[re],C[fe])});for(;!H.next().done;);}return ee=f(ee,w,k,z,T,_),ee=f(ee,C,W,z,j,N),vt(b,"patternProperties",ee),b},h=(b,{items:v=[],additionalItems:w},{items:j=[],additionalItems:A})=>{const C=Array.isArray(v),T=Array.isArray(j),N=[];if(b.items=N,C&&T){const[_,P,$]=v.length<j.length?[v.length,w,j]:[j.length,A,v];let E=0;for(;E<_;E++)N.push(x(v[E],j[E]));if(P===!1)b.additionalItems=!1;else{const D=P===void 0||Le(P);for(;E<$.length;E++)N.push(D?$[E]:x($[E],P));vt(b,"additionalItems",w!==void 0&&A!==void 0?x(w,A):w??A)}}else if(C||T){const[_,P,$]=C?[v,j,w]:[j,v,A];vt(b,"additionalItems",$&&x($,P));for(let E=0;E<_.length;E++)N.push(x(_[E],P))}else delete b.additionalItems,b.items=x(v,j);return b},y=(b,v,w)=>{no(b,v);const j=no({},w);return b.allOf===void 0?b.allOf=[j]:b.allOf=b.allOf.concat(j),b};function m(b,v){return r(Array.from(Er(b,v,x)))}const p=Ng([[Tg,u],[Pg,h],[Fg,y],...s]),g=Eg(o);function x(b,v){if(b===!1||v===!1)return!1;if(Le(b))return Le(v)?!0:v;if(Le(v))return b;let w={...b};const j=new Set,A=new Set,C=Object.keys(v),T=C.length;for(let N=0;N<T;N++){const _=C[N],P=v[_];if(P===void 0)continue;const $=g.get(_);if($!==void 0){const k=$.length;for(let B=0;B<k;B++){const W=$[B];b[W.oppositeKey]!==void 0&&A.add(W.check)}}const E=b[_];if(E===void 0){w[_]=P;continue}const D=p.get(_);if(D){j.add(D);continue}const M=O[_]??i;w[_]=M(E,P)}for(const N of j)w=N(w,b,v);for(const N of A)N(w);return w}const S=Zs(x),O={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(b,v)=>{if(b===v)return b;const w=Array.isArray(b),j=Array.isArray(v);if(!w&&!j){const A=Dr(b,v);if(A!==void 0)return A}else if(w||j){const A=new Set;if(w&&j)for(const T of Er(b,v,Dr))T!==void 0&&A.add(T);else{const T=w?b:v,N=w?v:b,_=T.length;for(let P=0;P<_;P++){const $=Dr(N,T[P]);$!==void 0&&A.add($)}}const C=A.size;if(C===1)return A.values().next().value;if(C>1)return Array.from(A)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${b.toString()}, ${v.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(b,v)=>{const w=r([b,v]);return w.length===1?w[0]:{anyOf:w}},pattern:t,readOnly:Ir,writeOnly:Ir,enum:(b,v)=>{const w=n(b,v);if(w.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(b)}", "${JSON.stringify(v)}"`);return w},anyOf:m,oneOf:m,allOf:(b,v)=>r(b.concat(v)),propertyNames:x,contains:x,dependencies:Zs((b,v)=>Array.isArray(b)?Array.isArray(v)?Nr(b,v):x(v,{required:b}):Array.isArray(v)?x(b,{required:v}):x(b,v)),examples:(b,v)=>{if(!Array.isArray(b)||!Array.isArray(v))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(b)}" and "${JSON.stringify(v)}"`);return Nr(b,v)},multipleOf:(b,v)=>{let w=1;for(;!Number.isInteger(b)||!Number.isInteger(v);)w*=10,b*=10,v*=10;return Cg(b,v)/w},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Ir,required:Nr,...a};return{mergeSchemaDefinitions:x,mergeArrayOfSchemaDefinitions:l}}function $g(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function kg(t){return e=>t($g(e))}var an={},ro;function Mg(){if(ro)return an;ro=1;var t=/~/,e=/~[01]/g;function n(d){switch(d){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+d)}function r(d){return t.test(d)?d.replace(e,n):d}function i(d,f,u){for(var h,y,m=1,p=f.length;m<p;){if(f[m]==="constructor"||f[m]==="prototype"||f[m]==="__proto__")return d;if(h=r(f[m++]),y=p>m,typeof d[h]>"u"&&(Array.isArray(d)&&h==="-"&&(h=d.length),y&&(f[m]!==""&&f[m]<1/0||f[m]==="-"?d[h]=[]:d[h]={})),!y)break;d=d[h]}var g=d[h];return u===void 0?delete d[h]:d[h]=u,g}function s(d){if(typeof d=="string"){if(d=d.split("/"),d[0]==="")return d;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(d)){for(const f of d)if(typeof f!="string"&&typeof f!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return d}throw new Error("Invalid JSON pointer.")}function o(d,f){if(typeof d!="object")throw new Error("Invalid input object.");f=s(f);var u=f.length;if(u===1)return d;for(var h=1;h<u;){if(d=d[r(f[h++])],u===h)return d;if(typeof d!="object"||d===null)return}}function a(d,f,u){if(typeof d!="object")throw new Error("Invalid input object.");if(f=s(f),f.length===0)throw new Error("Invalid JSON pointer for set.");return i(d,f,u)}function l(d){var f=s(d);return{get:function(u){return o(u,f)},set:function(u,h){return a(u,f,h)}}}return an.get=o,an.set=a,an.compile=l,an}var Rg=Mg();const $r=mi(Rg);function Bg(t,e){return t&&Zt(e,Fe(e),t)}function Ug(t,e){return t&&Zt(e,$n(e),t)}function Lg(t,e){return Zt(t,Ai(t),e)}var Vg=Object.getOwnPropertySymbols,rl=Vg?function(t){for(var e=[];t;)Oi(e,Ai(t)),t=ar(t);return e}:Aa;function Wg(t,e){return Zt(t,rl(t),e)}function Bi(t){return Oa(t,$n,rl)}var zg=Object.prototype,qg=zg.hasOwnProperty;function Kg(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&qg.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Gg(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Hg=/\w*$/;function Yg(t){var e=new t.constructor(t.source,Hg.exec(t));return e.lastIndex=t.lastIndex,e}var io=Ne?Ne.prototype:void 0,so=io?io.valueOf:void 0;function Xg(t){return so?Object(so.call(t)):{}}var Jg="[object Boolean]",Zg="[object Date]",Qg="[object Map]",ey="[object Number]",ty="[object RegExp]",ny="[object Set]",ry="[object String]",iy="[object Symbol]",sy="[object ArrayBuffer]",oy="[object DataView]",ay="[object Float32Array]",ly="[object Float64Array]",cy="[object Int8Array]",uy="[object Int16Array]",dy="[object Int32Array]",fy="[object Uint8Array]",my="[object Uint8ClampedArray]",hy="[object Uint16Array]",py="[object Uint32Array]";function gy(t,e,n){var r=t.constructor;switch(e){case sy:return ki(t);case Jg:case Zg:return new r(+t);case oy:return Gg(t,n);case ay:case ly:case cy:case uy:case dy:case fy:case my:case hy:case py:return Ka(t,n);case Qg:return new r;case ey:case ry:return new r(t);case ty:return Yg(t);case ny:return new r;case iy:return Xg(t)}}var yy="[object Map]";function xy(t){return Te(t)&&Ce(t)==yy}var oo=Kt&&Kt.isMap,by=oo?_i(oo):xy,vy="[object Set]";function Sy(t){return Te(t)&&Ce(t)==vy}var ao=Kt&&Kt.isSet,wy=ao?_i(ao):Sy,jy=1,Oy=2,Ay=4,il="[object Arguments]",Cy="[object Array]",_y="[object Boolean]",Ny="[object Date]",Ty="[object Error]",sl="[object Function]",Py="[object GeneratorFunction]",Fy="[object Map]",Ey="[object Number]",ol="[object Object]",Iy="[object RegExp]",Dy="[object Set]",$y="[object String]",ky="[object Symbol]",My="[object WeakMap]",Ry="[object ArrayBuffer]",By="[object DataView]",Uy="[object Float32Array]",Ly="[object Float64Array]",Vy="[object Int8Array]",Wy="[object Int16Array]",zy="[object Int32Array]",qy="[object Uint8Array]",Ky="[object Uint8ClampedArray]",Gy="[object Uint16Array]",Hy="[object Uint32Array]",ae={};ae[il]=ae[Cy]=ae[Ry]=ae[By]=ae[_y]=ae[Ny]=ae[Uy]=ae[Ly]=ae[Vy]=ae[Wy]=ae[zy]=ae[Fy]=ae[Ey]=ae[ol]=ae[Iy]=ae[Dy]=ae[$y]=ae[ky]=ae[qy]=ae[Ky]=ae[Gy]=ae[Hy]=!0;ae[Ty]=ae[sl]=ae[My]=!1;function mn(t,e,n,r,i,s){var o,a=e&jy,l=e&Oy,d=e&Ay;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!Z(t))return t;var f=ye(t);if(f){if(o=Kg(t),!a)return Mi(t,o)}else{var u=Ce(t),h=u==sl||u==Py;if(Ct(t))return qa(t,a);if(u==ol||u==il||h&&!i){if(o=l||h?{}:Ga(t),!a)return l?Wg(t,Ug(o,t)):Lg(t,Bg(o,t))}else{if(!ae[u])return i?t:{};o=gy(t,u,a)}}s||(s=new Ee);var y=s.get(t);if(y)return y;s.set(t,o),wy(t)?t.forEach(function(g){o.add(mn(g,e,n,g,t,s))}):by(t)&&t.forEach(function(g,x){o.set(x,mn(g,e,n,x,t,s))});var m=d?l?Bi:Jr:l?$n:Fe,p=f?void 0:m(t);return Di(p||t,function(g,x){p&&(x=g,g=t[x]),Ei(o,x,mn(g,e,n,x,t,s))}),o}function al(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Yy(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function Xy(t,e){return e.length<2?t:fr(t,Yy(e,0,-1))}var Jy=Object.prototype,Zy=Jy.hasOwnProperty;function ll(t,e){e=Jt(e,t);var n=-1,r=e.length;if(!r)return!0;for(var i=t==null||typeof t!="object"&&typeof t!="function";++n<r;){var s=e[n];if(typeof s=="string"){if(s==="__proto__"&&!Zy.call(t,"__proto__"))return!1;if(s==="constructor"&&n+1<r&&typeof e[n+1]=="string"&&e[n+1]==="prototype"){if(i&&n===0)continue;return!1}}}var o=Xy(t,e);return o==null||delete o[Ft(al(e))]}function Qy(t){return yt(t)?void 0:t}function ri(t){var e=t==null?0:t.length;return e?kn(t,1):[]}function cl(t){return Xa(Ya(t,void 0,ri),t+"")}var ex=1,tx=2,nx=4,wn=cl(function(t,e){var n={};if(t==null)return n;var r=!1;e=Xt(e,function(s){return s=Jt(s,t),r||(r=s.length>1),s}),Zt(t,Bi(t),n),r&&(n=mn(n,ex|tx|nx,Qy));for(var i=e.length;i--;)ll(n,e[i]);return n}),rx=kc();const Ui=mi(rx);function ir(t,e){if(oe in t&&Ui.equal(t[oe],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(Z(r)){const i=ir(r,e);if(i!==void 0)return i}}else if(Z(n)){const r=ir(n,e);if(r!==void 0)return r}}function ii(t,e){const n=I(t,oe,e);ce in t&&(t={...t,[ce]:Ui.resolve(n,t[ce])});for(const[r,i]of Object.entries(t))Array.isArray(i)?t={...t,[r]:i.map(s=>Z(s)?ii(s,n):s)}:Z(i)&&(t={...t,[r]:ii(i,n)});return t}function Li(t,e){const n=e[t];return[wn(e,[t]),n]}function ul(t,e={},n=[],r=I(e,[oe])){const i=t||"";let s;if(i.startsWith("#")){const a=decodeURIComponent(i.substring(1));r===void 0||oe in e&&e[oe]===r?s=$r.get(e,a):e[cn]===Gn&&(s=ir(e,r.replace(/\/$/,"")),s!==void 0&&(s=$r.get(s,a)))}else if(e[cn]===Gn){const a=r?Ui.resolve(r,i):i,[l,...d]=a.replace(/#\/?$/,"").split("#");s=ir(e,l.replace(/\/$/,"")),s!==void 0&&(r=s[oe],me(d)||(s=$r.get(s,decodeURIComponent(d.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const o=s[ce];if(o){if(n.includes(o)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[f,...u]=n,h=[...u,i,f].join(" -> ");throw new Error(`Definition for ${f} contains a circular reference through ${h}`)}const[a,l]=Li(ce,s),d=ul(l,e,[...n,i],r);return Object.keys(a).length>0?e[cn]===bf||e[cn]===Gn?{[gt]:[a,d]}:{...a,...d}:d}return s}function dl(t,e={},n=I(e,[oe])){return ul(t,e,[],n)}var ix="[object String]";function xt(t){return typeof t=="string"||!ye(t)&&Te(t)&&nt(t)==ix}function Ge(t){let e;const n=I(t,gf);return xt(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}function jn(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":isNaN(t)?typeof t=="object"?"object":"string":"number"}var sx=hr(function(t){return Za(kn(t,1,Sn,!0))});function Ie(t){let{type:e}=t;return!e&&t.const?jn(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function tt(t,e){const n=Object.assign({},t);return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&Y(o)?r[i]=tt(s,o):t&&e&&(Ie(t)==="object"||Ie(e)==="object")&&i===ha&&Array.isArray(s)&&Array.isArray(o)?r[i]=sx(s,o):r[i]=o,r},n)}var ox="[object Number]";function fl(t){return typeof t=="number"||Te(t)&&nt(t)==ox}function ml(t,e,n){var r;if(t&&n){const i=I(t,n);if(i===void 0)return;for(let s=0;s<e.length;s++){const o=e[s],a=I(o,[te,n],{});if(!(a.type==="object"||a.type==="array")&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Vi(t,e,n,r,i){if(e===void 0)return 0;const s=ml(e,n,i);if(fl(s))return s;for(let o=0;o<n.length;o++){const a=n[o];if(i&&X(a,[te,i])){const l=I(e,i),d=I(a,[te,i],{});if(t.isValid(d,l,r))return o}else if(a[te]){const l={anyOf:Object.keys(a[te]).map(f=>({required:[f]}))};let d;if(a.anyOf){const{...f}=a;f.allOf?f.allOf=f.allOf.slice():f.allOf=[],f.allOf.push(l),d=f}else d=Object.assign({},a,l);if(delete d.required,t.isValid(d,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}function be(t,e,n={},r,i,s=!1){return We(t,e,n,r,void 0,void 0,i,s)[0]}function ax(t,e,n,r,i,s,o){const{if:a,then:l,else:d,...f}=e,u=t.isValid(a,s||{},n);let h=[f],y=[];if(r)l&&typeof l!="boolean"&&(y=y.concat(We(t,l,n,s,r,i,o))),d&&typeof d!="boolean"&&(y=y.concat(We(t,d,n,s,r,i,o)));else{const m=u?l:d;m&&typeof m!="boolean"&&(y=y.concat(We(t,m,n,s,r,i,o)))}return y.length&&(h=y.map(m=>tt(f,m))),h.flatMap(m=>We(t,m,n,s,r,i,o))}function hl(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>Ma(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function pl(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(se(n,[r],t.patternProperties[r]),n),{})}function lx(t,e,n,r,i,s,o,a){const l=gl(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(bi in e)return yl(t,e,n,r,i,s,o).flatMap(f=>We(t,f,n,s,r,i,o));if(gt in e&&Array.isArray(e[gt])){const d=e.allOf.map(u=>We(t,u,n,s,r,i,o));return hl(d).map(u=>({...e,allOf:u}))}return[e]}function gl(t,e,n,r,i,s,o,a){const l=Vt(e,n,i,void 0,a);return l!==e?We(t,l,n,s,r,i,o,a):[e]}function Vt(t,e,n,r,i){if(!Y(t))return t;let s=t;if(ce in s){const{$ref:o,...a}=s;if(n.includes(o))return s;n.push(o),s={...dl(o,e,r),...a},oe in s&&(r=s[oe])}if(te in s){const o=[],a=kp(s[te],(l,d,f)=>{const u=[...n];l[f]=Vt(d,e,u,r,i),o.push(u)},{});Qp(n,Qa(ng(o))),s={...s,[te]:a}}if(zt in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Vt(s.items,e,n,r,i)}),i){let o,a;J in t&&Array.isArray(t[J])?(o=J,a=s[J]):q in t&&Array.isArray(t[q])&&(o=q,a=s[q]),o&&a&&(s={...s,[o]:a.map(l=>Vt(l,e,n,r,i))})}return le(t,s)?t:s}function cx(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&Y(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Hr in s){const l=pl(s,a);if(!me(l)){s.properties[a]=be(t,{[gt]:Object.values(l)},n,I(o,[a]),i),se(s.properties,[a,et],!0);return}}if(er in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ce in s.additionalProperties?l=be(t,{[ce]:I(s.additionalProperties,[ce])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:J in s.additionalProperties||q in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:jn(I(o,[a]))}:l={type:jn(I(o,[a]))},s.properties[a]=l,se(s.properties,[a,et],!0)}else s.properties[a]={type:"null"},se(s.properties,[a,et],!0)}}),s}const{compareSchemaDefinitions:ux,compareSchemaValues:dx}=Ag(),{mergeArrayOfSchemaDefinitions:fx}=Dg({intersectJson:bg(dx),deduplicateJsonSchemaDef:el(ux)}),mx=kg(fx);function hx(t){return mx(t)}function We(t,e,n,r,i=!1,s=[],o,a){return Y(e)?lx(t,e,n,i,s,r,o,a).flatMap(d=>{var f;let u=d;if(vi in u)return ax(t,u,n,i,s,r,o);if(gt in u){if(i){const{allOf:y,...m}=u;return[...y,m]}try{const y=[],m=[];(f=u.allOf)===null||f===void 0||f.forEach(p=>{typeof p=="object"&&p.contains?y.push(p):m.push(p)}),y.length&&(u={...u,allOf:m}),u=o?o(u):hx(u),y.length&&(u.allOf=y)}catch(y){console.warn(`could not merge subschemas in allOf:
|
|
2
|
+
`,y);const{allOf:m,...p}=u;return p}}return te in u&&Hr in u&&(u=Object.keys(u.properties).reduce((y,m)=>{const p=pl(y,m);return me(p)||(y.properties[m]=be(t,{allOf:[y.properties[m],...Object.values(p)]},n,I(r,[m]),o)),y},{...u,properties:{...u.properties}})),Hr in u||er in u&&u.additionalProperties!==!1?cx(t,u,n,r,o):u}):[{}]}function px(t,e,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=e;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const d=i===void 0&&r?{}:i,f=Ge(e);s=s.map(h=>Vt(h,n,[]));const u=Vi(t,d,s,n,f);if(r)return s.map(h=>tt(l,h));e=tt(l,s[u])}return[e]}function yl(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return px(t,l,n,r,s).flatMap(f=>xl(t,a,f,n,r,i,s,o))}function xl(t,e,n,r,i,s,o,a){let l=[n];for(const d in e){if(!i&&I(o,[d])===void 0||n.properties&&!(d in n.properties))continue;const[f,u]=Li(d,e);return Array.isArray(u)?l[0]=gx(n,u):Y(u)&&(l=yx(t,n,r,d,u,i,s,o,a)),l.flatMap(h=>xl(t,f,h,r,i,s,o,a))}return l}function gx(t,e){if(!e)return t;const n=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:n}}function yx(t,e,n,r,i,s,o,a,l){return We(t,i,n,a,s,o,l).flatMap(f=>{const{oneOf:u,...h}=f;if(e=tt(e,h),u===void 0)return e;const y=u.map(p=>typeof p=="boolean"||!(ce in p)?[p]:gl(t,p,n,s,o,a));return hl(y).flatMap(p=>xx(t,e,n,r,p,s,o,a,l))})}function xx(t,e,n,r,i,s,o,a,l){const d=i.filter(f=>{if(typeof f=="boolean"||!f||!f.properties)return!1;const{[r]:u}=f.properties;if(u){const h={type:"object",properties:{[r]:u}};return t.isValid(h,a,n)||s}return!1});return!s&&d.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[e]):d.flatMap(f=>{const u=f,[h]=Li(r,u.properties),y={...u,properties:h};return We(t,y,n,a,s,o,l).map(p=>tt(e,p))})}function dn(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=Ge(n)||r,d=n[i].map(u=>be(t,u,e,s,o)),f=I(s,l);if(f!==void 0)return d.find(u=>ft(I(u,[te,l,or],I(u,[te,l,_e])),f))}}function bl(t,e,n,r,i){let s=n;if(X(n,ce)&&(s=be(t,n,e,void 0,i)),me(r))return s;const o=Array.isArray(r)?r:r.split("."),[a,...l]=o;if(a&&X(s,a))return s=I(s,a),bl(t,e,s,l,i)}function Xn(t,e,n,r,i,s){const o=bl(t,e,n,r,s);return o===void 0?i:o}const lo={title:"!@#$_UNKNOWN_$#@!"};function bx(t,e,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop();o.length&&o.forEach(h=>{a=Xn(t,e,a,[te,h],{},s),X(a,q)?a=dn(t,e,a,l,q,I(i,h),s):X(a,J)&&(a=dn(t,e,a,l,J,I(i,h),s))}),X(a,q)?a=dn(t,e,a,l,q,i,s):X(a,J)&&(a=dn(t,e,a,l,J,i,s));let d=Xn(t,e,a,[te,l],lo,s);d===lo&&(d=void 0);const f=Xn(t,e,a,ha,[],s);let u;return d&&Array.isArray(f)&&(u=f.includes(l)),{field:d,isRequired:u}}function vx(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function Sx(t,e){return function(n,r){if(n==null)return n;if(!Pt(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var vl=Sx(Ua);function wx(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function jx(t,e,n){var r=ye(t)?vx:wx,i=arguments.length<3;return r(t,$i(e),n,i,vl)}const Ox={type:"object",$id:pf,properties:{__not_really_there__:{type:"number"}}};function si(t,e,n,r,i){let s=0;return n&&(Z(n.properties)?s+=jx(n.properties,(o,a,l)=>{const d=I(r,l);if(typeof a=="boolean")return o;if(X(a,ce)){const f=be(t,a,e,d,i);return o+si(t,e,f,d||{},i)}if((X(a,q)||X(a,J))&&d){const f=X(a,q)?q:J,u=Ge(a);return o+On(t,e,d,I(a,f),-1,u,i)}if(a.type==="object")return Z(d)&&(o+=1),o+si(t,e,a,d,i);if(a.type===jn(d)){let f=o+1;return a.default?f+=d===a.default?1:-1:a.const&&(f+=d===a.const?1:-1),f}return o},0):xt(n.type)&&n.type===jn(r)&&(s+=1)),s}function On(t,e,n,r,i=-1,s,o){const a=r.map(h=>Vt(h,e,[])),l=ml(n,r,s);if(fl(l))return l;const d=a.reduce((h,y,m)=>(Vi(t,n,[Ox,y],e,s)===1&&h.push(m),h),[]);if(d.length===1)return d[0];d.length||Ma(a.length,h=>d.push(h));const f=new Set,{bestIndex:u}=d.reduce((h,y)=>{const{bestScore:m}=h,p=a[y],g=si(t,e,p,n,o);return f.add(g),g>m?{bestIndex:y,bestScore:g}:h},{bestIndex:i,bestScore:0});return f.size===1&&i>=0?i:u}function Wi(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>Y(e))}function sr(t){return t==null}function An(t,e,n=!1,r=!1,i=!1){if(Array.isArray(e)){const s=Array.isArray(t)?t:[],o=i?s:e,a=i?e:s,l=o.map((d,f)=>a[f]!==void 0?An(s[f],e[f],n,r,i):d);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(Y(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const d=I(e,a),f=Y(t)&&a in t,u=a in e,h=(l=I(t,a))!==null&&l!==void 0?l:{},y=f&&Object.entries(h).some(([,g])=>Y(g)),m=f&&Y(I(t,a)),p=u&&Y(d);return m&&p&&!y?(o[a]={...I(t,a),...d},o):(o[a]=An(I(t,a),d,n,r,i&&(f||!u)),o)},s)}return r&&(t!==void 0&&sr(e)||typeof e=="number"&&isNaN(e))||i&&!sr(e)?t:e}function Cn(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&Y(o))r[i]=Cn(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,d)=>(s.includes(d)||l.push(d),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},Object.assign({},t))}function Sl(t){return Array.isArray(t.enum)&&t.enum.length===1||_e in t}function zi(t,e,n={},r){const i=be(t,e,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&Sl(o)):!1}function qi(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:zi(t,e.items,n,r)}function wl(t){const e=t[_e],n=Ie(t);return Y(e)&&xt(e?.$data)&&n!=="object"&&n!=="array"}function Ax(t){if(hf in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(_e in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function Gt(t,e){if(t.enum){let s;if(e){const{enumNames:o}=U(e);s=o}return t.enum.map((o,a)=>({label:s?.[a]||String(o),value:o}))}let n,r;t.anyOf?(n=t.anyOf,r=e?.anyOf):t.oneOf&&(n=t.oneOf,r=e?.oneOf);let i=Ge(t);if(e){const{optionsSchemaSelector:s=i}=U(e);i=s}return n&&n.map((s,o)=>{const{title:a}=U(r?.[o]),l=s;let d,f=a;if(i){const u=I(l,[te,i],{});d=I(u,or,I(u,_e)),f=f||u?.title||l.title||String(d)}else d=Ax(l),f=f||l.title||String(d);return{schema:l,label:f,value:d}})}const Cx=["string","number","integer","boolean","null"];var Ht;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(Ht||(Ht={}));function kr(t,e=Ht.Ignore,n=-1){if(n>=0){if(Array.isArray(t.items)&&n<t.items.length){const r=t.items[n];if(typeof r!="boolean")return r}}else if(t.items&&!Array.isArray(t.items)&&typeof t.items!="boolean")return t.items;return e!==Ht.Ignore&&Y(t.additionalItems)?t.additionalItems:{}}function jl(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&me(e)&&n===null?null:e}function co(t,e,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:d="populateAllDefaults"}=o;if(r===!0||a)t[e]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!Y(n)||!me(n))&&(t[e]=n);else if(d!=="skipDefaults"){const f=i===void 0?s.includes(e):i;Y(n)?d==="skipEmptyDefaults"?me(n)||(t[e]=n):(!me(n)||s.includes(e))&&(f||d!=="populateRequiredDefaults")&&(t[e]=n):n!==void 0&&(d==="populateAllDefaults"||d==="skipEmptyDefaults"||f&&s.includes(e))&&(t[e]=n)}}function mt(t,e,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:d=void 0,required:f,shouldMergeDefaultsIntoFormData:u=!1,initialDefaultsGenerated:h}=n;let y=Y(i)?i:{};const m=Y(e)?e:{};let p=r,g=null,x=l,S=a;if(m[_e]!==void 0&&l?.constAsDefaults!=="never"&&!wl(m))p=m[_e];else if(Y(p)&&Y(m.default)&&!m[J]&&!m[q]&&!m[ce])p=Cn(p,m.default);else if(or in m&&!m[J]&&!m[q]&&!m[ce])p=m.default;else if(ce in m){const v=m[ce];a.includes(v)||(S=a.concat(v),g=dl(v,s));const w=i===void 0||Y(i)&&me(i);g&&!p&&w&&(p=m.default),u&&g&&!Y(i)&&(y=i)}else if(bi in m){const v={...uo(t,m,n,p),...y};g=yl(t,m,s,!1,[],v,d)[0]}else if(Wi(m))p=m.items.map((v,w)=>mt(t,v,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:d,parentDefaults:Array.isArray(r)?r[w]:void 0,rawFormData:y,required:f,shouldMergeDefaultsIntoFormData:u}));else if(q in m){const{oneOf:v,...w}=m;if(v.length===0)return;const j=Ge(m),{type:A="null"}=w;!Array.isArray(A)&&Cx.includes(A)&&x?.constAsDefaults==="skipOneOf"&&(x={...x,constAsDefaults:"never"}),g=v[On(t,s,i??m.default,v,0,j,d)],g=tt(w,g)}else if(J in m){const{anyOf:v,...w}=m;if(v.length===0)return;const j=Ge(m);g=v[On(t,s,i??m.default,v,0,j,d)],g=tt(w,g)}if(g)return mt(t,g,{rootSchema:s,includeUndefinedValues:o,_recurseList:S,experimental_defaultFormStateBehavior:x,experimental_customMergeAllOf:d,parentDefaults:p,rawFormData:i??y,required:f,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:h});p===void 0&&(p=m.default);const O=uo(t,m,n,p);let b=O??p;if(u){const{arrayMinItems:v={}}=l||{},{mergeExtraDefaults:w}=v,j=_x(t,m,s,i,l,d);(!Y(i)||gt in m)&&(b=An(b,j,w,!0))}return b}function _x(t,e,n,r,i,s){const o=!Sl(e)&&zi(t,e,n,s);let a=r;if(o){const d=Gt(e);a=d?.some(u=>le(u.value,r))?r:void 0}return e[_e]&&i?.constAsDefaults==="always"&&(a=e.const),a}function Nx(t,e,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f}={},u){{const h=Y(n)?n:{},y=e,p=o?.allOf==="populateDefaults"&> in y||o?.emptyObjectFields!=="skipEmptyDefaults"&&vi in y?be(t,y,r,h,a):y,g=p[_e],x=Object.keys(p.properties||{}).reduce((S,O)=>{var b;const v=I(p,[te,O],{}),w=Y(g)&&g[O]!==void 0,j=(Y(v)&&_e in v||w)&&o?.constAsDefaults!=="never"&&!wl(v),A=mt(t,v,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:I(u,[O]),rawFormData:I(h,[O]),required:(b=p.required)===null||b===void 0?void 0:b.includes(O),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});return co(S,O,A,i,l,p.required,o,j,v?.type==="null"),S},{});if(p.additionalProperties&&!f){const S=Y(p.additionalProperties)?p.additionalProperties:{},O=new Set;Y(u)&&Object.keys(u).filter(v=>!p.properties||!p.properties[v]).forEach(v=>O.add(v));const b=[];Object.keys(h).filter(v=>!p.properties||!p.properties[v]).forEach(v=>{O.add(v),b.push(v)}),O.forEach(v=>{var w;const j=mt(t,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:I(u,[v]),rawFormData:I(h,[v]),required:(w=p.required)===null||w===void 0?void 0:w.includes(v),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});co(x,v,j,i,l,b)})}return jl(e,x)}}function Tx(t,e,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f}={},u){var h,y;const m=e,p=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:g,mergeExtraDefaults:x}=p,S=g==="never",O=g==="requiredOnly",b=g==="all"||!S&&!O,v=(y=p?.computeSkipPopulate)!==null&&y!==void 0?y:(()=>!1),j=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(u)&&(u=u.map((N,_)=>{const P=kr(m,Ht.Fallback,_),$=Array.isArray(n)?n[_]:void 0;return mt(t,P,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:N,rawFormData:$,required:a,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f})})),Array.isArray(n)){const N=kr(m);if(S)u=n;else{const _=n.map(($,E)=>mt(t,N,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:$,parentDefaults:I(u,[E]),required:a,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f}));u=An(u,_,(O&&a||b)&&x)}}if((Y(m)&&_e in m&&s?.constAsDefaults!=="never")===!1){if(S)return u??j;if(O&&!a)return u||void 0}let C;const T=Array.isArray(u)?u.length:0;if(!m.minItems||qi(t,m,r,o)||v(t,m,r)||m.minItems<=T)C=u||!a&&!l?u:j;else{const N=u||[],_=kr(m,Ht.Invert),P=_.default,$=Array.from({length:m.minItems-T},()=>mt(t,_,{parentDefaults:P,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:d}));C=N.concat($)}return jl(e,C)}function uo(t,e,n={},r){switch(Ie(e)){case"object":return Nx(t,e,n,r);case"array":return Tx(t,e,n,r)}}function Ol(t,e,n,r,i=!1,s,o,a){if(!Y(e))throw new Error("Invalid schema: "+e);const l=be(t,e,r,n,o),d=mt(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&Y(l.default))return{...d,...n};if(Y(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:f}=s||{};return An(d,n,!0,f==="useDefaultIfFormDataUndefined",!0)}return d}function Al(t={}){return"widget"in U(t)&&U(t).widget!=="hidden"}function Cl(t,e,n={},r,i){if(n[wi]==="files")return!0;if(e.items){const s=be(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function Px(t,e,n={},r,i,s){const o=U(n,i),{label:a=!0}=o;let l=!!a;if(l){const d=Ie(e),f=I(e,et,!1);d==="array"&&(l=f||qi(t,e,r,s)||Cl(t,e,n,r,s)||Al(n)),d==="object"&&(l=f),d==="boolean"&&n&&!n[wi]&&(l=!1),n&&n[xf]&&(l=!1)}return l}function _l(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=fr(t,o);n(a,o)&&Ii(s,Jt(o,t),a)}return s}function Fx(t,e){return _l(t,e,function(n,r){return Wa(t,r)})}var Ki=cl(function(t,e){return t==null?{}:Fx(t,e)});function wt(t,e,n,r,i,s=[],o){if(ce in e||bi in e||gt in e||vi in e){const l=be(t,e,r,i,o);if(s.findIndex(f=>le(f,l))===-1)return wt(t,l,n,r,i,s.concat(l),o)}let a={[Kn]:n.replace(/^\./,"")};if(q in e||J in e){const l=q in e?e.oneOf:e.anyOf,d=Ge(e),f=On(t,r,i,l,0,d,o),u=l[f];a={...a,...wt(t,u,n,r,i,s,o)}}if(er in e&&e[er]!==!1&&se(a,Si,!0),zt in e&&Array.isArray(i)){const{items:l,additionalItems:d}=e;Array.isArray(l)?i.forEach((f,u)=>{l[u]?a[u]=wt(t,l[u],`${n}.${u}`,r,f,s,o):d?a[u]=wt(t,d,`${n}.${u}`,r,f,s,o):console.warn(`Unable to generate path schema for "${n}.${u}". No schema defined for it`)}):i.forEach((f,u)=>{a[u]=wt(t,l,`${n}.${u}`,r,f,s,o)})}else if(te in e)for(const l in e.properties){const d=I(e,[te,l],{});a[l]=wt(t,d,`${n}.${l}`,r,I(i,[l]),s,o)}return a}function Nl(t,e,n="",r,i,s){return wt(t,e,n,r,i,void 0,s)}function Tl(t,e){if(e.length===0&&typeof t!="object")return t;const n=Ki(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function Pl(t,e){const n=(i,s)=>typeof i!="object"||me(i)||s&&!me(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const d=i[l];if(typeof d=="object"){const f=o.map(u=>[...u,l]);d[Si]&&d[Kn]!==""?s.push(d[Kn]):r(d,s,f)}else l===Kn&&d!==""&&o.forEach(f=>{const u=I(e,f),h=a.length===1;(n(u,h)||Array.isArray(u)&&u.every(y=>n(y,h)))&&s.push(f)})}),s};return r(t)}function Ex(t,e,n={},r){const i=be(t,e,n,r),s=Nl(t,i,"",n,r),a=Pl(s,r).map(l=>Array.isArray(l)?l.join("."):l);return Tl(r,a)}const $t=Symbol("no Value");function oi(t,e,n,r,i={},s){let o;if(X(n,te)){const a={};if(X(r,te)){const f=I(r,te,{});Object.keys(f).forEach(u=>{X(i,u)&&(a[u]=void 0)})}const l=Object.keys(I(n,te,{})),d={};l.forEach(f=>{const u=I(i,f);let h=I(r,[te,f],{}),y=I(n,[te,f],{});X(h,ce)&&(h=be(t,h,e,u,s)),X(y,ce)&&(y=be(t,y,e,u,s));const m=I(h,"type"),p=I(y,"type");if(!m||m===p)if(X(a,f)&&delete a[f],p==="object"||p==="array"&&Array.isArray(u)){const g=oi(t,e,y,h,u,s);(g!==void 0||p==="array")&&(d[f]=g)}else{const g=I(y,"default",$t),x=I(h,"default",$t);g!==$t&&g!==u&&(x===u?a[f]=g:I(y,"readOnly")===!0&&(a[f]=void 0));const S=I(y,"const",$t),O=I(h,"const",$t);S!==$t&&S!==u&&(a[f]=O===u?S:void 0)}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...d}}else if(I(r,"type")==="array"&&I(n,"type")==="array"&&Array.isArray(i)){let a=I(r,"items"),l=I(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){X(a,ce)&&(a=be(t,a,e,i,s)),X(l,ce)&&(l=be(t,l,e,i,s));const d=I(a,"type"),f=I(l,"type");if(!d||d===f){const u=I(n,"maxItems",-1);f==="object"?o=i.reduce((h,y)=>{const m=oi(t,e,l,a,y,s);return m!==void 0&&(u<0||h.length<u)&&h.push(m),h},[]):o=u>0&&i.length>u?i.slice(0,u):i}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}class Ix{constructor(e,n,r,i){n&&n[cn]===Gn?this.rootSchema=ii(n,I(n,oe,"#")):this.rootSchema=n,this.validator=e,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,n,r={},i){return!e||!n?!1:this.validator!==e||!le(this.rootSchema,n)||!le(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(e,n,r){return bx(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return dn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return Ol(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return Px(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return On(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return Vi(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return Xn(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return Cl(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return qi(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return zi(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return Ex(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return be(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return oi(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return Nl(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function Dx(t,e,n={},r){return new Ix(t,e,n,r)}function $x(t){var e;if(t.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=t.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[o,...a]=i.split(";"),l=o||"",d=decodeURI(((e=a.map(f=>f.split("=")).find(([f])=>f==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const f=atob(s),u=new Array(f.length);for(let y=0;y<f.length;y++)u[y]=f.charCodeAt(y);return{blob:new window.Blob([new Uint8Array(u)],{type:l}),name:d}}catch(f){throw new Error("File is invalid: "+f.message)}}function lt(t,e){let n=String(t);for(;n.length<e;)n="0"+n;return n}function Fl(t,e){if(t<=0&&e<=0)t=new Date().getFullYear()+t,e=new Date().getFullYear()+e;else if(t<0||e<0)throw new Error(`Both start (${t}) and stop (${e}) must both be <= 0 or > 0, got one of each`);if(t>e)return Fl(e,t).reverse();const n=[];for(let r=t;r<=e;r++)n.push({value:r,label:lt(r,2)});return n}function fo(t,e){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const s=n[i];if(!Object.prototype.hasOwnProperty.call(e,s)||!Object.is(t[s],e[s]))return!1}return!0}function kx(t,e){let n=t;if(Array.isArray(e)){const r=n.split(/(%\d)/);e.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function Mx(t,e){return kx(t,e)}function ge(t,e=[],n){if(Array.isArray(t))return t.map(s=>ge(s,e)).filter(s=>s!==n);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function El(t,e,n=[]){const r=ge(t,n);return Array.isArray(e)?e.filter(i=>!le(i,r)):le(r,e)?void 0:e}function Mn(t,e){return Array.isArray(e)?e.some(n=>le(n,t)):le(e,t)}function Il(t,e=[],n=!1){const r=e.map((i,s)=>Mn(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Dl(t,e,n=[]){const r=ge(t,n);if(!sr(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return e.slice(0,i).concat(r,e.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return e}var Rx=1,Bx=4;function Gi(t){return mn(t,Rx|Bx)}function Ux(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:Ii(t,e,n,r)}class $l{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let r=Array.isArray(e)&&e.length>0||typeof e=="string"?I(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},Ux(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Gi(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=I(r,xe);return Array.isArray(i)||(i=[],r[xe]=i),Array.isArray(e)?se(r,xe,[...new Set([...i,...e])]):se(r,xe,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return se(r,xe,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return se(n,xe,[]),this}}function Lx(t,e){if(t==null)return{};var n=Xt(Bi(t),function(r){return[r]});return e=$i(e),_l(t,n,function(r,i){return e(r,i[0])})}var Vx=200;function Wx(t,e,n,r){var i=-1,s=Ri,o=!0,a=t.length,l=[],d=e.length;if(!a)return l;e.length>=Vx&&(s=vn,o=!1,e=new At(e));e:for(;++i<a;){var f=t[i],u=f;if(f=f!==0?f:0,o&&u===u){for(var h=d;h--;)if(e[h]===u)continue e;l.push(f)}else s(e,u,r)||l.push(f)}return l}var zx=hr(function(t,e){return Sn(t)?Wx(t,kn(e,1,Sn,!0)):[]});function mo(t,e){const n=yt(t),r=yt(e);if(t===e||!n&&!r)return[];if(n&&!r)return Fe(t);if(!n&&r)return Fe(e);{const i=Fe(Lx(t,(o,a)=>!le(o,I(e,a)))),s=zx(Fe(e),Fe(t));return[...i,...s]}}function qx(t,e,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:d}=t,f={type:"day",range:[1,31],value:i},u={type:"month",range:[1,12],value:s},h={type:"year",range:n,value:o},y=[];switch(r){case"MDY":y.push(u,f,h);break;case"DMY":y.push(f,u,h);break;default:y.push(h,u,f)}return e&&y.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:d}),y}function kl(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function Ml(t,e,n={},r=!0){const i={type:e||"text",...kl(t)};return n.inputType?i.type=n.inputType:e||(t.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}const ho={props:{disabled:!1},submitText:"Submit",norender:!1};function Rl(t={}){const e=U(t);if(e&&e[tr]){const n=e[tr];return{...ho,...n}}return ho}function L(t,e,n={}){const{templates:r}=e;if(t==="ButtonTemplates")return r[t];if(Object.hasOwn(n,t)&&typeof n[t]=="string"&&Object.hasOwn(r,n[t])){const i=n[t];return r[i]}return n[t]||r[t]}var Kx=0;function Bl(t){var e=++Kx;return Pi(t)+e}function Hi(){if(typeof process>"u"||I(process,"env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,Bl("test-id-")),t.get(n)}})}const Mr={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Gx(t){let e=I(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>c.jsx(t,{options:{...n,...r},...i}),se(t,"MergedWidget",e)}return e}function He(t,e,n={}){const r=Ie(t);if(typeof e=="function"||e&&hs.isForwardRef(F.createElement(e))||hs.isMemo(e))return Gx(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e} in schema: ${JSON.stringify(t)}`);if(e in n){const i=n[e];return He(t,i,n)}if(typeof r=="string"){if(!(r in Mr))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in Mr[r]){const i=n[Mr[r][e]];return He(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function Hx(t){let e=0;for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return e.toString(16)}function Yx(t){const e=new Set;return JSON.stringify(t,(n,r)=>(e.add(n),r)),JSON.stringify(t,Array.from(e).sort())}function ze(t){return Hx(Yx(t))}function Xx(t){return ze(t)}function Jx(t,e,n={}){try{return He(t,e,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Et(t,e){return`${xt(t)?t:t[oe]}__${e}`}function It(t){return Et(t,"description")}function Yi(t){return Et(t,"error")}function _n(t){return Et(t,"examples")}function Xi(t){return Et(t,"help")}function gr(t){return Et(t,"title")}function we(t,e=!1){const n=e?` ${_n(t)}`:"";return`${Yi(t)} ${It(t)} ${Xi(t)}${n}`}function jt(t,e){return`${t}-${e}`}function qe(t,e){return Et(t,e)}function Rr(t,e){return Et(t,`optional${e}`)}function Qt(t){return!sr(t)&&(!Z(t)||Array.isArray(t)||!me(t))}function Zx(t,e){const{rootSchema:n,schemaUtils:r}=t;if(ft(e,n))return!0;if(ce in n){const i=r.retrieveSchema(n);return ft(e,i)}return!1}function Ul(t,e,n){return e?n:t}function Qx(t){return t?new Date(t).toJSON():void 0}function Ji(t,e,n){const r=[yf];return X(t,Ss)&&r.unshift(Ss),I(t,[...r,e],n)}function e0(t,e){if(!Array.isArray(e))return t;const n=f=>f.reduce((u,h)=>(u[h]=!0,u),{}),r=f=>f.length>1?`properties '${f.join("', '")}'`:`property '${f[0]}'`,i=n(t),s=e.filter(f=>f==="*"||i[f]),o=n(s),a=t.filter(f=>!o[f]),l=s.indexOf("*");if(l===-1){if(a.length)throw new Error(`uiSchema order list does not contain ${r(a)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const d=[...s];return d.splice(l,1,...a),d}function Br(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const n=new Date(t);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:e?n.getUTCHours():0,minute:e?n.getUTCMinutes():0,second:e?n.getUTCSeconds():0}}function hn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return hn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return hn(t.oneOf[0]);if(t.allOf){const e=n=>hn(n);return t.allOf.some(e)}return!1}function Ll(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!fo(o,e)||!fo(a,n)}const{props:i,state:s}=t;return!le(i,e)||!le(s,n)}function po(t){const e=Qa(t.map(n=>Z(n)?Ie(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function Rn(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=U(r,t.globalUiOptions);let s;return J in e&&Array.isArray(e[J])?s=po(e[J]):q in e&&Array.isArray(e[q])?s=po(e[q]):s=Ie(e),!Zx(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function go(t,e=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=t,l=Date.UTC(n,r-1,i,s,o,a),d=new Date(l).toJSON();return e?d:d.slice(0,10)}function Zi(t,e=[]){if(!t)return[];let n=[];return xe in t&&(n=n.concat(t[xe].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==xe){const s=t[i];yt(s)&&(r=r.concat(Zi(s,[...e,i])))}return r},n)}function Vl(t){return ye(t)?Xt(t,Ft):Dn(t)?[t]:Mi(Ea(Pi(t)))}function t0(t){const e=new $l;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:Vl(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&e.addErrors(i,s)}),e.ErrorSchema}function Pe(t,e,n,r){const i=Array.isArray(n)?n:n?.path,s=t===""?[]:[t],o=i?i.concat(...s):s,a=[e.idPrefix,...o].join(e.idSeparator);let l;return e.nameGenerator&&o.length>0&&(l=e.nameGenerator(o,e.idPrefix,r)),{path:o,[oe]:a,...l!==void 0&&{name:l}}}function Wl(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;{const r=t[n];return yt(r)?{...e,[n]:Wl(r)}:{...e,[n]:r}}},{})}function n0(t){return Object.values(t).every(e=>e!==-1)}function r0(t){const{className:e="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:d,autofocus:f,registry:u,onBlur:h,onFocus:y}=t,m=`${o}_${n}`,{SelectWidget:p}=u.widgets,g=F.useCallback(x=>s(n,x),[s,n]);return c.jsx(p,{schema:{type:"integer"},id:m,name:a,className:e,options:{enumOptions:Fl(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:d,autofocus:f,onChange:g,onBlur:h,onFocus:y,registry:u,label:"","aria-describedby":we(o)})}function i0(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=F.useState(Br(o,e));F.useEffect(()=>{l(Br(o,e))},[e,o]);const d=F.useCallback((y,m)=>{const p={...a,[y]:typeof m>"u"?-1:m};n0(p)?s(go(p,e)):l(p)},[a,s,e]),f=F.useCallback(y=>{y.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),u=F.useCallback(y=>{if(y.preventDefault(),n||r)return;const m=Br(new Date().toJSON(),e);s(go(m,e))},[n,r,e,s]);return{elements:F.useMemo(()=>qx(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:d,handleClear:f,handleSetNow:u}}function Dt(t){const e=F.useRef(t);return ft(t,e.current)||(e.current=t),e.current}function s0(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function o0(t){const{name:e,size:n,type:r}=t;return new Promise((i,s)=>{const o=new window.FileReader;o.onerror=s,o.onload=a=>{var l;typeof((l=a.target)===null||l===void 0?void 0:l.result)=="string"?i({dataURL:s0(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function a0(t){return Promise.all(Array.from(t).map(o0))}function yo(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=$x(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function l0(t,e,n=!1){const r=F.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=F.useMemo(()=>Array.isArray(t)?yo(t):yo([t||""]),[t]),s=F.useCallback(a=>{a0(a).then(l=>{const d=l.map(f=>f.dataURL||null);e(n?r.concat(...d):d[0])})},[r,n,e]),o=F.useCallback(a=>{if(n){const l=r.filter((d,f)=>f!==a);e(l)}else e(void 0)},[r,n,e]);return{filesInfo:i,handleChange:s,handleRemove:o}}function c0(t){if(!t)return"";const e=new Date(t),n=lt(e.getFullYear(),4),r=lt(e.getMonth()+1,2),i=lt(e.getDate(),2),s=lt(e.getHours(),2),o=lt(e.getMinutes(),2),a=lt(e.getSeconds(),2),l=lt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Jn(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Zi(e),o=e;return me(i)||(o=Cn(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function u0(t){for(const e in t){const n=t,r=n[e];e===ce&&typeof r=="string"&&r.startsWith("#")?n[e]=ya+r:n[e]=Qi(r)}return t}function d0(t){for(let e=0;e<t.length;e++)t[e]=Qi(t[e]);return t}function Qi(t){return Array.isArray(t)?d0([...t]):Z(t)?u0({...t}):t}var K;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.EmptyArray="No items yet. Use the button below to add some.",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.OptionalObjectAdd="Add data for optional field",t.OptionalObjectRemove="Remove data for optional field",t.OptionalObjectEmptyMsg="No data for optional field",t.Type="Type",t.Value="Value",t.ClearButton="clear input",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(K||(K={}));function f0(t,e){var n=ye(t)?Di:vl;return n(t,$a(e))}function m0(t,e){return t==null?!0:ll(t,e)}function ai(){return Bl("rjsf-array-item-")}function xo(t){return Array.isArray(t)?t.map(e=>({key:ai(),item:e})):[]}function zl(t){return Array.isArray(t)?t.map(e=>e.item):[]}function h0(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function ql(t,e,n,r){let{addable:i}=U(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function Kl(t,e,n,r){if(typeof t.items=="function")try{return t.items(e,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return t.items}function p0(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:Wi(e)&&mf(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function g0(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:d,onBlur:f,onFocus:u,registry:h,rawErrors:y,name:m,onSelectChange:p}=t,{widgets:g,schemaUtils:x,globalFormOptions:S,globalUiOptions:O}=h,b=x.retrieveSchema(e.items,i),v=Gt(b,r),{widget:w="select",title:j,...A}=U(r,O),C=He(e,w,g),T=j??e.title??m,N=x.getDisplayLabel(e,r,O),_=Dt(Pe("",S,n,!0));return c.jsx(C,{id:_[oe],name:m,multiple:!0,onChange:p,onBlur:f,onFocus:u,options:{...A,enumOptions:v},schema:e,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:T,hideLabel:!N,placeholder:d,autofocus:a,rawErrors:y,htmlName:_.name})}function y0(t){const{schema:e,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:d,onBlur:f,onFocus:u,formData:h=[],registry:y,rawErrors:m,name:p,onSelectChange:g}=t,{widgets:x,schemaUtils:S,globalFormOptions:O,globalUiOptions:b}=y,{widget:v,title:w,...j}=U(r,b),A=He(e,v,x),C=w??e.title??p,T=S.getDisplayLabel(e,r,b),N=Dt(Pe("",O,n,!0));return c.jsx(A,{id:N[oe],name:p,multiple:!0,onChange:g,onBlur:f,onFocus:u,options:j,schema:e,uiSchema:r,registry:y,value:h,disabled:i,readonly:s,hideError:l,required:a,label:C,hideLabel:!T,placeholder:d,autofocus:o,rawErrors:m,htmlName:N.name})}function x0(t){const{schema:e,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:d,onFocus:f,registry:u,formData:h=[],rawErrors:y,onSelectChange:m}=t,{widgets:p,schemaUtils:g,globalFormOptions:x,globalUiOptions:S}=u,{widget:O="files",title:b,...v}=U(n,S),w=He(e,O,p),j=b??e.title??i,A=g.getDisplayLabel(e,n,S),C=Dt(Pe("",x,r,!0));return c.jsx(w,{options:v,id:C[oe],name:i,multiple:!0,onChange:m,onBlur:d,onFocus:f,schema:e,uiSchema:n,value:h,disabled:s,readonly:o,required:l,registry:u,autofocus:a,rawErrors:y,label:j,hideLabel:!A,htmlName:C.name})}function Gl(t){const{itemKey:e,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:d,canAdd:f,canRemove:u=!0,canMoveUp:h,canMoveDown:y,itemSchema:m,itemData:p,itemUiSchema:g,itemFieldPathId:x,itemErrorSchema:S,autofocus:O,onBlur:b,onFocus:v,onChange:w,rawErrors:j,totalItems:A,title:C,handleAddItem:T,handleCopyItem:N,handleRemoveItem:_,handleReorderItems:P}=t,{schemaUtils:$,fields:{ArraySchemaField:E,SchemaField:D},globalUiOptions:M}=a,k=Dt(x),B=E||D,W=L("ArrayFieldItemTemplate",a,l),R=$.getDisplayLabel(m,g,M),{description:V}=U(g),Q=!!V||!!m.description,{orderable:ne=!0,removable:ie=!0,copyable:de=!1}=l,ee={moveUp:ne&&h,moveDown:ne&&y,copy:de&&f,remove:ie&&u,toolbar:!1};ee.toolbar=Object.keys(ee).some(pe=>ee[pe]);const z=F.useCallback(pe=>{T(pe,n+1)},[T,n]),H=F.useCallback(pe=>{N(pe,n)},[N,n]),re=F.useCallback(pe=>{_(pe,n)},[_,n]),fe=F.useCallback(pe=>{P(pe,n,n-1)},[P,n]),je=F.useCallback(pe=>{P(pe,n,n+1)},[P,n]),Se={children:c.jsx(B,{name:r,title:C,index:n,schema:m,uiSchema:g,formData:p,errorSchema:S,fieldPathId:k,required:h0(m),onChange:w,onBlur:b,onFocus:v,registry:a,disabled:i,readonly:o,hideError:s,autofocus:O,rawErrors:j}),buttonsProps:{fieldPathId:k,disabled:i,readonly:o,canAdd:f,hasCopy:ee.copy,hasMoveUp:ee.moveUp,hasMoveDown:ee.moveDown,hasRemove:ee.remove,index:n,totalItems:A,onAddItem:z,onCopyItem:H,onRemoveItem:re,onMoveUpItem:fe,onMoveDownItem:je,registry:a,schema:m,uiSchema:g},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:ee.toolbar,index:n,totalItems:A,readonly:o,registry:a,schema:m,uiSchema:g,parentUiSchema:d,displayLabel:R,hasDescription:Q};return c.jsx(W,{...Se})}function b0(t){const{schema:e,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:d=!1,autofocus:f=!1,required:u=!1,hideError:h=!1,registry:y,onBlur:m,onFocus:p,rawErrors:g,onChange:x,keyedFormData:S,handleAddItem:O,handleCopyItem:b,handleRemoveItem:v,handleReorderItems:w}=t,j=e.title||a||o,{schemaUtils:A,fields:C,formContext:T,globalFormOptions:N,globalUiOptions:_}=y,{OptionalDataControlsField:P}=C,$=U(n,_),E=Z(e.items)?e.items:{},D=A.retrieveSchema(E),M=zl(S),k=Rn(y,e,u,n),B=Qt(s),W=ql(y,e,M,n)&&(!k||B),R=B?S:[],V=k?" rjsf-optional-array-field":"",Q=t.childFieldPathId??i,ne=k?c.jsx(P,{...t,fieldPathId:Q}):void 0,ie={canAdd:W,items:R.map((ee,z)=>{const{key:H,item:re}=ee,fe=re,je=A.retrieveSchema(E,fe),Se=r?r[z]:void 0,pe=Pe(z,N,Q),Oe=Kl(n,re,z,T),De={itemKey:H,index:z,name:o&&`${o}-${z}`,registry:y,uiOptions:$,hideError:h,readonly:d,disabled:l,required:u,title:j?`${j}-${z+1}`:void 0,canAdd:W,canMoveUp:z>0,canMoveDown:z<M.length-1,itemSchema:je,itemFieldPathId:pe,itemErrorSchema:Se,itemData:fe,itemUiSchema:Oe,autofocus:f&&z===0,onBlur:m,onFocus:p,rawErrors:g,totalItems:S.length,handleAddItem:O,handleCopyItem:b,handleRemoveItem:v,handleReorderItems:w,onChange:x};return c.jsx(Gl,{...De},H)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${D.type}${V}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:O,readonly:d,required:u,schema:e,title:j,formData:M,rawErrors:g,registry:y,optionalDataControl:ne},de=L("ArrayFieldTemplate",y,$);return c.jsx(de,{...ie})}function v0(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:d=!1,autofocus:f=!1,required:u=!1,hideError:h=!1,registry:y,onBlur:m,onFocus:p,rawErrors:g,keyedFormData:x,onChange:S,handleAddItem:O,handleCopyItem:b,handleRemoveItem:v,handleReorderItems:w}=t;let{formData:j=[]}=t;const A=e.title||a||o,{schemaUtils:C,fields:T,formContext:N,globalFormOptions:_,globalUiOptions:P}=y,$=U(n,P),{OptionalDataControlsField:E}=T,D=Rn(y,e,u,n),M=Qt(r),B=(Z(e.items)?e.items:[]).map((z,H)=>C.retrieveSchema(z,j[H])),W=Z(e.additionalItems)?C.retrieveSchema(e.additionalItems,r):null,R=t.childFieldPathId??s;j.length<B.length&&(j=j.concat(new Array(B.length-j.length)));const V=M?x:[],Q=D?" rjsf-optional-array-field":"",ne=D?c.jsx(E,{...t,fieldPathId:R}):void 0,ie=ql(y,e,j,n)&&!!W&&(!D||M),de={canAdd:ie,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${Q}`,disabled:l,fieldPathId:s,formData:r,items:V.map((z,H)=>{const{key:re,item:fe}=z,je=fe,Se=H>=B.length,pe=(Se&&Z(e.additionalItems)?C.retrieveSchema(e.additionalItems,je):B[H])||{},Oe=Pe(H,_,R);let De;Se?De=n.additionalItems:Array.isArray(n.items)?De=n.items[H]:De=Kl(n,fe,H,N);const nn=i?i[H]:void 0,Je={index:H,itemKey:re,name:o&&`${o}-${H}`,registry:y,uiOptions:$,hideError:h,readonly:d,disabled:l,required:u,title:A?`${A}-${H+1}`:void 0,canAdd:ie,canRemove:Se,canMoveUp:H>=B.length+1,canMoveDown:Se&&H<j.length-1,itemSchema:pe,itemData:je,itemUiSchema:De,itemFieldPathId:Oe,itemErrorSchema:nn,autofocus:f&&H===0,onBlur:m,onFocus:p,rawErrors:g,totalItems:x.length,onChange:S,handleAddItem:O,handleCopyItem:b,handleRemoveItem:v,handleReorderItems:w};return c.jsx(Gl,{...Je},re)}),onAddClick:O,readonly:d,required:u,registry:y,schema:e,uiSchema:n,title:A,errorSchema:i,rawErrors:g,optionalDataControl:ne},ee=L("ArrayFieldTemplate",y,$);return c.jsx(ee,{...de})}function S0(t=[]){const e=F.useMemo(()=>ze(t),[t]),[n,r]=F.useState(()=>({formDataHash:e,keyedFormData:xo(t)}));let{keyedFormData:i,formDataHash:s}=n;if(e!==s){const a=Array.isArray(t)?t:[],l=i||[];i=a.length===l.length?l.map((d,f)=>({key:d.key,item:a[f]})):xo(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=F.useCallback(a=>{const l=zl(a),d=ze(l);return r({formDataHash:d,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function w0(t){const{schema:e,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=t,{globalFormOptions:l,schemaUtils:d,translateString:f}=s,{keyedFormData:u,updateKeyedFormData:h}=S0(o),y=t.childFieldPathId??i,m=F.useCallback((w,j)=>{w&&w.preventDefault();let A;if(r){A={};for(const N in r){const _=parseInt(N);j===void 0||_<j?se(A,[_],r[N]):_>=j&&se(A,[_+1],r[N])}}const C={key:ai(),item:p0(s,e)},T=[...u];j!==void 0?T.splice(j,0,C):T.push(C),a(h(T),y.path,A)},[u,s,e,a,h,r,y]),p=F.useCallback((w,j)=>{w&&w.preventDefault();let A;if(r){A={};for(const N in r){const _=parseInt(N);_<=j?se(A,[_],r[N]):_>j&&se(A,[_+1],r[N])}}const C={key:ai(),item:Gi(u[j].item)},T=[...u];j!==void 0?T.splice(j+1,0,C):T.push(C),a(h(T),y.path,A)},[u,a,h,r,y]),g=F.useCallback((w,j)=>{w&&w.preventDefault();let A;if(r){A={};for(const T in r){const N=parseInt(T);N<j?se(A,[N],r[T]):N>j&&se(A,[N-1],r[T])}}const C=u.filter((T,N)=>N!==j);a(h(C),y.path,A)},[u,a,h,r,y]),x=F.useCallback((w,j,A)=>{w&&(w.preventDefault(),w.currentTarget.blur());let C;if(r){C={};for(const _ in r){const P=parseInt(_);P==j?se(C,[A],r[j]):P==A?se(C,[j],r[A]):se(C,[_],r[P])}}function T(){const _=u.slice();return _.splice(j,1),_.splice(A,0,u[j]),_}const N=T();a(h(N),y.path,C)},[u,a,h,r,y]),S=F.useCallback((w,j,A,C)=>{a(w===void 0?null:w,j,A,C)},[a]),O=F.useCallback(w=>{a(w,y.path,void 0,y?.[oe])},[a,y]),b={...t,formData:o,fieldPathId:y,onSelectChange:O},v={...t,handleAddItem:m,handleCopyItem:p,handleRemoveItem:g,handleReorderItems:x,keyedFormData:u,onChange:S};if(!(zt in e)){if(!l.useFallbackUiForUnsupportedType){const j=U(n),A=L("UnsupportedFieldTemplate",s,j);return c.jsx(A,{schema:e,fieldPathId:i,reason:f(K.MissingItems),registry:s})}const w={...e,[zt]:{type:void 0}};b.schema=w,v.schema=w}return d.isMultiSelect(b.schema)?c.jsx(g0,{...b}):Al(n)?c.jsx(y0,{...b}):Wi(b.schema)?c.jsx(v0,{...v}):d.isFilesArray(b.schema,n)?c.jsx(x0,{...b}):c.jsx(b0,{...v})}function j0(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:d,hideError:f,autofocus:u,title:h,onChange:y,onFocus:m,onBlur:p,rawErrors:g}=t,{title:x}=e,{widgets:S,translateString:O,globalUiOptions:b}=o,{widget:v="checkbox",title:w,label:j=!0,enumNames:A,...C}=U(r,b),T=He(e,v,S),N=O(K.YesLabel),_=O(K.NoLabel);let P;const $=w??x??h??n;if(Array.isArray(e.oneOf))P=Gt({oneOf:e.oneOf.map(D=>{if(Z(D))return{...D,title:D.title||(D.const===!0?N:_)}}).filter(D=>D)},r);else{const D=e.enum??[!0,!1];!A&&D.length===2&&D.every(M=>typeof M=="boolean")?P=[{value:D[0],label:D[0]?N:_},{value:D[1],label:D[1]?N:_}]:P=Gt({enum:D},r)}const E=F.useCallback((D,M,k)=>y(D,i.path,M,k),[y,i]);return c.jsx(T,{options:{...C,enumOptions:P},schema:e,uiSchema:r,id:i.$id,name:n,onChange:E,onFocus:m,onBlur:p,label:$,hideLabel:!j,value:s,required:a,disabled:l,readonly:d,hideError:f,registry:o,autofocus:u,rawErrors:g,htmlName:i.name})}function O0(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function A0(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function C0(t,e){switch(e){case"string":return String(t);case"number":{const n=Number(t);return isNaN(n)?0:n}case"boolean":return!!t;default:return t}}function _0(t){const{id:e,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:d=!1,onBlur:f,onFocus:u,registry:h,fieldPathId:y,onChange:m,errorSchema:p}=t,{translateString:g,fields:x,globalFormOptions:S}=h,[O,b]=F.useState(A0(n)),v=U(o),w=Dt(Pe("__internal_type_selector",S,y)),j=g(K.Type),A=F.useMemo(()=>O0(j),[j]),C=_=>{_!=null&&(b(_),m(C0(n,_),y.path,p,e))};if(!S.useFallbackUiForUnsupportedType){const{reason:_=g(K.UnknownFieldType,[String(i.type)])}=t,P=L("UnsupportedFieldTemplate",h,v);return c.jsx(P,{schema:i,fieldPathId:y,reason:_,registry:h})}const T=L("FallbackFieldTemplate",h,v),{SchemaField:N}=x;return c.jsx(T,{schema:i,registry:h,typeSelector:c.jsx(N,{fieldPathId:w,name:`${s}__fallback_type`,schema:A,formData:O,onChange:C,onBlur:f,onFocus:u,registry:h,hideLabel:!r,disabled:l,readonly:d,required:a},n?ze(n):"__empty__"),schemaField:c.jsx(N,{...t,schema:{type:O,title:g(K.Value),...O==="object"&&{additionalProperties:!0}}})})}function N0(t,e){return Xt(e,function(n){return t[n]})}function T0(t){return t==null?[]:N0(t,Fe(t))}var P0=Math.max;function F0(t,e,n,r){t=Pt(t)?t:T0(t),n=n?ka(n):0;var i=t.length;return n<0&&(n=P0(i+n,0)),xt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ja(t,e,n)>-1}var E0=Math.min;function I0(t,e,n){for(var r=Ri,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,d=[];o--;){var f=t[o];l=E0(f.length,l),a[o]=i>=120&&f.length>=120?new At(o&&f):void 0}f=t[0];var u=-1,h=a[0];e:for(;++u<i&&d.length<l;){var y=f[u],m=y;if(y=y!==0?y:0,!(h?vn(h,m):r(d,m))){for(o=s;--o;){var p=a[o];if(!(p?vn(p,m):r(t[o],m)))continue e}h&&h.push(m),d.push(y)}}return d}function D0(t){return Sn(t)?t:[]}var bo=hr(function(t){var e=Xt(t,D0);return e.length&&e[0]===t[0]?I0(e):[]});function Hl(t){return t===void 0}var Ke;(function(t){t.ROW="ui:row",t.COLUMN="ui:col",t.COLUMNS="ui:columns",t.CONDITION="ui:condition"})(Ke||(Ke={}));var pn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(pn||(pn={}));const $0=/^\$lookup=(.+)/,Ur="layoutGrid";function vo(t,e){return t??e}function k0(t){return/^\d+?$/.test(t)}const ht=Hi();function M0(t,e,n,r,i){const s=I(n,[Yr],{}),o=I(n,t),a={...I(o,[dt],{}),...e,...s},l={...o};me(a)||se(l,[dt],a),me(s)||se(l,[Yr],s);let{readonly:d}=U(l);return(i===!0||Hl(d)&&r===!0)&&(d=!0,X(a,jr)?se(l,[dt,jr],!0):se(l,`ui:${jr}`,!0)),{fieldUiSchema:l,uiReadonly:d}}function R0(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=ri([e]).sort(),i=ri([n]).sort();switch(t){case pn.ALL:return ft(r,i);case pn.SOME:return bo(r,i).length>0;case pn.NONE:return bo(r,i).length===0;default:return!1}}function yr(t,e,n){let r={},i=t[e];if(yt(i)){const{children:s,className:o,...a}=i;if(i=s,o){const d=o.split(" ").map(f=>Ji(n,f,f)).join(" ");r={...a,className:d}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${e}" in ${JSON.stringify(t)}`);return{children:i,gridProps:r}}function So(t,e,n){let r;if(k0(n)&&t&&t?.type==="array"&&X(t,zt)){const i=Number(n),s=t[zt];Array.isArray(s)?i>s.length?r=al(s):r=s[i]:r=s,e={[oe]:e[oe],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function B0(t,e,n,r,i){const{schemaUtils:s,globalFormOptions:o}=t;let a=n,l=i;const d=e.split("."),f=d.pop();let u=s.retrieveSchema(a,r),h=r,y=u.readOnly;d.forEach(g=>{if(l=Pe(g,o,l),X(u,te))a=I(u,[te,g],{});else if(u&&(X(u,q)||X(u,J))){const x=X(u,q)?q:J,S=s.findSelectedOptionInXxxOf(u,g,x,h);a=I(S,[te,g],{})}else{const x=So(u,l,g);a=x.rawSchema??{},l=x.fieldPathId}h=I(h,g,{}),u=s.retrieveSchema(a,h),y=vo(u.readOnly,y)});let m,p=!1;if(me(u)&&(u=void 0),u&&f){if(u&&(X(u,q)||X(u,J))){const x=X(u,q)?q:J;u=s.findSelectedOptionInXxxOf(u,f,x,h)}l=Pe(f,o,l),p=u!==void 0&&Array.isArray(u.required)&&F0(u.required,f);const g=So(u,l,f);if(g.rawSchema?(u=g.rawSchema,l=g.fieldPathId):(u=I(u,[te,f]),u=u&&s.retrieveSchema(u)),y=vo(u?.readOnly,y),u&&(X(u,q)||X(u,J))){const x=X(u,q)?q:J,S=Ge(u);m={options:u[x],hasDiscriminator:!!S}}}return{schema:u,isRequired:p,isReadonly:y,optionsInfo:m,fieldPathId:l}}function U0(t,e){let n=t;return xt(n)&&(n=Ji(e,n)),Fn(n)?n:null}function L0(t,e){let n,r=null,i={},s;if(xt(e)||Hl(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,me(i)||f0(i,(d,f)=>{if(xt(d)){const u=$0.exec(d);if(Array.isArray(u)&&u.length>1){const h=u[1];i[f]=Ji(t,h,h)}}}),r=U0(a,t),!o&&r&&(s=c.jsx(r,{...l,"data-testid":ht.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function xr(t){const{childrenLayoutGridSchemaId:e,...n}=t,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return e.map(l=>F.createElement(es,{...n,key:`layoutGrid-${ze(l)}`,schema:a,layoutGridSchema:l}))}function V0(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=yr(e,Ke.CONDITION,i),{operator:a,field:l="",value:d}=o,f=I(r,l,null);return R0(a,f,d)?c.jsx(xr,{...n,childrenLayoutGridSchemaId:s}):null}function W0(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=yr(e,Ke.COLUMN,r),a=U(i),l=L("GridTemplate",r,a);return c.jsx(l,{column:!0,"data-testid":ht.col,...o,children:c.jsx(xr,{...n,childrenLayoutGridSchemaId:s})})}function z0(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=yr(e,Ke.COLUMNS,r),a=U(i),l=L("GridTemplate",r,a);return s.map(d=>c.jsx(l,{column:!0,"data-testid":ht.col,...o,children:c.jsx(xr,{...n,childrenLayoutGridSchemaId:[d]})},`column-${ze(d)}`))}function q0(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=yr(e,Ke.ROW,r),a=U(i),l=L("GridTemplate",r,a);return c.jsx(l,{...o,"data-testid":ht.row,children:c.jsx(xr,{...n,childrenLayoutGridSchemaId:s})})}function K0(t){const{gridSchema:e,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:d,registry:f,layoutGridSchema:u,...h}=t,{onChange:y}=h,{fields:m}=f,{SchemaField:p,LayoutMultiSchemaField:g}=m,x=L0(f,e),{name:S,UIComponent:O,uiProps:b}=x,{schema:v,isRequired:w,isReadonly:j,optionsInfo:A,fieldPathId:C}=B0(f,S,n,l,s),T=Dt(C);if(x.rendered)return x.rendered;if(v){const N=A?.hasDiscriminator?g:p,{fieldUiSchema:_,uiReadonly:P}=M0(S,b,r,j,d);return c.jsx(N,{"data-testid":A?.hasDiscriminator?ht.layoutMultiSchemaField:ht.field,...h,name:S,required:w,readonly:P,schema:v,uiSchema:_,errorSchema:I(i,S),fieldPathId:T,formData:I(l,S),onChange:y,onBlur:o,onFocus:a,options:A?.options,registry:f})}return O?c.jsx(O,{"data-testid":ht.uiComponent,...h,name:S,required:w,formData:l,readOnly:!!j||d,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:f,...b}):null}function es(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=U(e);if(!n&&Ur in r&&Z(r[Ur])&&(n=r[Ur]),Z(n)){if(Ke.ROW in n)return c.jsx(q0,{...t,layoutGridSchema:n});if(Ke.COLUMN in n)return c.jsx(W0,{...t,layoutGridSchema:n});if(Ke.COLUMNS in n)return c.jsx(z0,{...t,layoutGridSchema:n});if(Ke.CONDITION in n)return c.jsx(V0,{...t,layoutGridSchema:n})}return c.jsx(K0,{...t,gridSchema:n})}es.TEST_IDS=ht;function G0(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=U(i,o.globalUiOptions),{title:d}=l,{title:f}=r,u=d||n||f||a;if(!u)return null;const h=L("TitleFieldTemplate",o,l);return c.jsx(h,{id:gr(e),title:u,required:s,schema:r,uiSchema:i,registry:o})}function Lr(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=I(s,[te,e]);return I(o,or,I(o,_e,r))===n})}function wo(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;X(t,q)?o={...t,[q]:s}:X(t,J)&&(o={...t,[J]:s});const a=Gt(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function H0(t){const{name:e,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:d,registry:f,uiSchema:u,schema:h,autofocus:y,readonly:m,required:p,errorSchema:g,hideError:x=!1}=t,{widgets:S,schemaUtils:O,globalUiOptions:b}=f,[v,w]=F.useState(wo(h,l,O,u,i)),j=I(s,oe),A=Ge(h),C=L("FieldErrorTemplate",f,l),T=L("FieldTemplate",f,l),N=ze(h),_=ze(l),P=u?ze(u):"",$=i?ze(i):"";F.useEffect(()=>{w(wo(h,l,O,u,i))},[N,_,O,P,$]);const{widget:E=A?"radio":"select",title:D="",placeholder:M="",optionsSchemaSelector:k=A,hideError:B,...W}=U(u);if(!k)throw new Error("No selector field provided for the LayoutMultiSchemaField");const R=I(i,k);let V=I(v[0]?.schema,[te,k],{});const Q=Lr(v,k,R);V=V?.type?V:{...V,type:Q?.type||n};const ne=He(V,E,S),ie=B===void 0?x:!!B,de=I(g,[xe],[]),ee=wn(g,[xe]),z=O.getDisplayLabel(h,u,b),H=je=>{const Se=Lr(v,k,je),pe=Lr(v,k,R);let Oe=O.sanitizeDataForNewSchema(Se,pe,i);Oe&&Se&&(Oe=O.getDefaultFormState(Se,Oe,"excludeObjectChildren")),Oe&&se(Oe,k,je),a(Oe,s.path,void 0,j)},re={enumOptions:v,...W},fe=!ie&&de.length>0?c.jsx(C,{fieldPathId:s,schema:h,errors:de,registry:f}):void 0;return c.jsx(T,{fieldPathId:s,id:j,schema:h,label:(D||h.title)??"",disabled:r||Array.isArray(v)&&me(v),uiSchema:u,required:p,readonly:!!m,registry:f,displayLabel:z,errors:fe,onChange:a,onKeyRename:Hn,onKeyRenameBlur:Hn,onRemoveProperty:Hn,children:c.jsx(ne,{id:j,name:e,schema:h,label:(D||h.title)??"",disabled:r||Array.isArray(v)&&me(v),uiSchema:u,autofocus:y,readonly:m,required:p,registry:f,multiple:!1,rawErrors:de,hideError:ie,hideLabel:!z,errorSchema:ee,placeholder:M,onChange:H,onBlur:o,onFocus:d,value:R,options:re,htmlName:s.name})})}class jo extends F.Component{constructor(e){super(e);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(e,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!le(e.options,i)){const{registry:{schemaUtils:l}}=this.props,d=i.map(f=>l.retrieveSchema(f,r));a={selectedOption:o,retrievedOptions:d}}if(!le(r,e.formData)&&s.$id===e.fieldPathId.$id){const{retrievedOptions:l}=a,d=this.getMatchingOption(o,r,l);n&&d!==o&&(a={selectedOption:d,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(e,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=Ge(i);return s.getClosestMatchingOption(n,r,e,o)}onOptionChange=e=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,d=e!==void 0?parseInt(e,10):-1;if(d===n)return;const f=d>=0?r[d]:void 0,u=n>=0?r[n]:void 0;let h=l.sanitizeDataForNewSchema(f,u,i);f&&(h=l.getDefaultFormState(f,h,"excludeObjectChildren")),this.setState({selectedOption:d},()=>{s(h,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:e,schema:n}=this.props;return`${e.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:d,schema:f,uiSchema:u}=this.props,{widgets:h,fields:y,translateString:m,globalUiOptions:p,schemaUtils:g}=d,{SchemaField:x}=y,S=L("MultiSchemaFieldTemplate",d,p),O=Rn(d,f,l,u),b=Qt(i),{selectedOption:v,retrievedOptions:w}=this.state,{widget:j="select",placeholder:A,autofocus:C,autocomplete:T,title:N=f.title,..._}=U(u,p),P=He({type:"number"},j,h),$=I(r,xe,[]),E=wn(r,[xe]),D=g.getDisplayLabel(f,u,p),M=v>=0&&w[v]||null;let k;if(M){const{required:de}=f;k=de?tt({required:de},M):M}let B=[];q in f&&u&&q in u?Array.isArray(u[q])?B=u[q]:console.warn(`uiSchema.oneOf is not an array for "${N||e}"`):J in f&&u&&J in u&&(Array.isArray(u[J])?B=u[J]:console.warn(`uiSchema.anyOf is not an array for "${N||e}"`));let W=u;v>=0&&B.length>v&&(W=B[v]);const R=N?K.TitleOptionPrefix:K.OptionPrefix,V=N?[N]:[],Q=w.map((de,ee)=>{const{title:z=de.title}=U(B[ee]);return{label:z||m(R,V.concat(String(ee+1))),value:ee}}),ne=!O||b?c.jsx(P,{id:this.getFieldId(),name:`${e}${f.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||me(Q),multiple:!1,rawErrors:$,errorSchema:E,value:v>=0?v:void 0,options:{enumOptions:Q,..._},registry:d,placeholder:A,autocomplete:T,autofocus:C,label:N??e,hideLabel:!D,readonly:a}):void 0,ie=k&&k.type!=="null"&&c.jsx(x,{...this.props,schema:k,uiSchema:W})||null;return c.jsx(S,{schema:f,registry:d,uiSchema:u,selector:ne,optionSchemaField:ie})}}const Y0=/\.([0-9]*0)*$/,X0=/[0.]0*$/;function J0(t){const{registry:e,onChange:n,formData:r,value:i}=t,[s,o]=F.useState(i),{StringField:a}=e.fields;let l=r;const d=F.useCallback((f,u,h,y)=>{o(f),`${f}`.charAt(0)==="."&&(f=`0${f}`);const m=typeof f=="string"&&f.match(Y0)?vs(f.replace(X0,"")):vs(f);n(m,u,h,y)},[n]);if(typeof s=="string"&&typeof l=="number"){const f=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(f)&&(l=s)}return c.jsx(a,{...t,formData:l,onChange:d})}function Ve(){return Ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ve.apply(null,arguments)}const Vn=["strong","em","del","mark"],Oo=[["**",Vn[0]],["__",Vn[0]],["~~",Vn[2]],["==",Vn[3]],["*","em"],["_","em"]];function Z0(t,e){for(var n=1,r=e+1;r<t.length&&n>0;)t[r]!=="\\"?(t[r]==="["&&n++,t[r]==="]"&&n--,r++):r+=2;if(n===0&&r<t.length&&(t[r]==="("||t[r]==="[")){var i=t[r]==="("?")":"]",s=1;for(r++;r<t.length&&s>0;)t[r]!=="\\"?(t[r]==="("&&i===")"&&s++,t[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function Q0(t,e){if(!e||!e.inline&&!e.simple)return null;var n=t[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=Oo[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=Oo[o][1];break}}if(!r)return null;for(var l=i,d=!1,f=!1,u="",h=0,y="",m=!1,p="";l<t.length;){var g=t[l];if(m)y+=g,m=!1,p=g,l++;else if(g!=="\\")if(g!=="`"||h!==0){if(g==="["&&!d&&h===0){var x=Z0(t,l);if(x!==-1){y+=t.slice(l,x),l=x,p=t[x-1];continue}}if(f)y+=g,u?g===u&&(u=""):g==='"'||g==="'"?u=g:g===">"&&(f=!1),p=g,l++;else if(g!=="<"||d){if(g===`
|
|
3
|
+
`&&p===`
|
|
4
|
+
`&&!d&&h===0)return null;if(!d&&h===0){for(var S=0;l+S<t.length&&t[l+S]===r[0];)S++;if(S>=i&&(i!==1||r!=="*"&&r!=="_"||t[l-1]!==r&&t[l+1]!==r)){var O=[t.slice(0,l+S),s,y+t.slice(l+i,l+S)];return O.index=0,O.input=t,O}}y+=g,p=g,l++}else{var b=t[l+1],v=t.indexOf(">",l);if(v!==-1){var w=t.slice(l,v+1).endsWith("/>");b==="/"?h=Math.max(0,h-1):w||h++}f=!0,y+=g,p=g,l++}}else d=!d,y+=g,p=g,l++;else y+=g,m=!0,p=g,l++}return null}const eb=["children","options"],Ao=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,e)=>(t[e.toLowerCase()]=e,t),{class:"className",for:"htmlFor"}),Co={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},tb=["style","script","pre"],nb=["src","href","data","formAction","srcDoc","action"],rb=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,ib=/\n{2,}$/,_o=/^(\s*>[\s\S]*?)(?=\n\n|$)/,sb=/^ *> ?/gm,ob=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,ab=/^ {2,}\n/,lb=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,No=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,To=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,cb=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,ub=/^(?:\n *)*\n/,db=/\r\n?/g,fb=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,mb=/^\[\^([^\]]+)]/,hb=/\f/g,pb=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,gb=/^\[(x|\s)\]/,Po=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Fo=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Eo=/^([^\n]+)\n *(=|-)\2{2,} *\n/,ts=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function yb(t){const e=ts.exec(t);if(!e)return null;const n=e[1],r=n.toLowerCase(),i=r.length+1;let s=e[0].length;t[s]===`
|
|
5
|
+
`&&s++;const o=s;let a=s,l=1;const d=t.length;for(;l>0;){const u=t.indexOf("<",s);if(u===-1)return null;let h=-1,y=-1;if(t[u+1]==="/")y=u;else if(t[u+1]===r[0]||t[u+1]===n[0]){let m=!0;for(let p=0;p<r.length;p++){const g=t[u+1+p];if(g!==r[p]&&g!==n[p]){m=!1;break}}!m||t[u+i]!==" "&&t[u+i]!==">"||(h=u)}if(h!==-1||y!==-1)if(h!==-1&&(y===-1||h<y))s=h+i+1,l++;else{let m=y+2;for(;m<d;){const g=t[m];if(g!==" "&&g!==" "&&g!==`
|
|
6
|
+
`&&g!=="\r")break;m++}if(m+r.length>d)return null;let p=!0;for(let g=0;g<r.length;g++){const x=t[m+g];if(x!==r[g]&&x!==n[g]){p=!1;break}}if(!p){s=m;continue}for(m+=r.length;m<d;){const g=t[m];if(g!==" "&&g!==" "&&g!==`
|
|
7
|
+
`&&g!=="\r")break;m++}if(m>=d||t[m]!==">"){s=m;continue}a=y,s=m+1,l--}else s=u+1}let f=0;for(;s+f<d&&t[s+f]===`
|
|
8
|
+
`;)f++;return[t.slice(0,s+f),n,e[2],t.slice(o,a)]}const xb=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Io=/^<!--[\s\S]*?(?:-->)/,bb=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,li=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,vb=/^\{.*\}$/,Sb=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,wb=/^<([^ >]+[:@\/][^ >]+)>/,jb=/-([a-z])?/gi,Do=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Ob=/^[^\n]+(?: \n|\n{2,})/,Ab=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Cb=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,_b=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Nb=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Tb=/\t/g,Pb=/(^ *\||\| *$)/g,Fb=/^ *:-+: *$/,Eb=/^ *:-+ *$/,Ib=/^ *-+: *$/,Db=/^(:[a-zA-Z0-9-_]+:)/,$b=/^\\([^0-9A-Za-z\s])/,kb=/\\([^0-9A-Za-z\s])/g,Mb=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Rb=/^\n+/,Bb=/^([ \t]*)/,Ub=/(?:^|\n)( *)$/,ns="(?:\\d+\\.)",rs="(?:[*+-])";function Yl(t){return"( *)("+(t===1?ns:rs)+") +"}const Xl=Yl(1),Jl=Yl(2);function Zl(t){return RegExp("^"+(t===1?Xl:Jl))}const Lb=Zl(1),Vb=Zl(2);function Ql(t){return RegExp("^"+(t===1?Xl:Jl)+"[^\\n]*(?:\\n(?!\\1"+(t===1?ns:rs)+" )[^\\n]*)*(\\n|$)","gm")}const Wb=Ql(1),zb=Ql(2);function ec(t){const e=t===1?ns:rs;return RegExp("^( *)("+e+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+e+" (?!"+e+" ))\\n*|\\s*\\n*$)")}const tc=ec(1),nc=ec(2);function $o(t,e){const n=e===1,r=n?tc:nc,i=n?Wb:zb,s=n?Lb:Vb;return{t:o=>s.test(o),o:ut(function(o,a){const l=Ub.exec(a.prevCapture);return l&&(a.list||!a.inline&&!a.simple)?r.exec(o=l[1]+o):null}),u:1,i(o,a,l){const d=n?+o[2]:void 0,f=o[0].replace(ib,`
|
|
9
|
+
`).match(i),u=s.exec(f[0]),h=RegExp("^ {1,"+(u?u[0].length:0)+"}","gm");let y=!1;return{items:f.map(function(m,p){const g=m.replace(h,"").replace(s,""),x=p===f.length-1,S=$e(g,`
|
|
10
|
+
|
|
11
|
+
`)||x&&y;y=S;const O=l.inline,b=l.list;let v;l.list=!0,S?(l.inline=!1,v=gn(g)+`
|
|
12
|
+
|
|
13
|
+
`):(l.inline=!0,v=gn(g));const w=a(v,l);return l.inline=O,l.list=b,w}),ordered:n,start:d}}}}const qb=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Kb=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function ko(t){return typeof t=="string"}function gn(t){let e=t.length;for(;e>0&&t[e-1]<=" ";)e--;return t.slice(0,e)}function ci(t,e){return t.startsWith(e)}function $e(t,e){return t.indexOf(e)!==-1}function Gb(t,e,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(ci(t,n[r]))return!0;return!1}return n(t,e)}function ln(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Hb(t){return Ib.test(t)?"right":Fb.test(t)?"center":Eb.test(t)?"left":null}function Mo(t,e,n,r){const i=n.inTable;n.inTable=!0;let s=[[]],o="";function a(){if(!o)return;const l=s[s.length-1];l.push.apply(l,e(o,n)),o=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,d,f)=>{l.trim()==="|"&&(a(),r)?d!==0&&d!==f.length-1&&s.push([]):o+=l}),a(),n.inTable=i,s}function Yb(t,e,n){n.inline=!0;const r=t[2]?t[2].replace(Pb,"").split("|").map(Hb):[],i=t[3]?(function(o,a,l){return o.trim().split(`
|
|
14
|
+
`).map(function(d){return Mo(d,a,l,!0)})})(t[3],e,n):[],s=Mo(t[1],e,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function Ro(t,e){return t.align[e]==null?{}:{textAlign:t.align[e]}}function ut(t){return t.inline=1,t}function ot(t){return ut(function(e,n){return n.inline?t.exec(e):null})}function Wn(t){return ut(function(e,n){return n.inline||n.simple?t.exec(e):null})}function Ze(t){return function(e,n){return n.inline||n.simple?null:t.exec(e)}}function Bo(t){return ut(function(e){return t.exec(e)})}const Xb=/(javascript|vbscript|data(?!:image)):/i;function Jb(t){try{const e=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(Xb.test(e))return null}catch{return null}return t}function Ue(t){return t&&t.replace(kb,"$1")}function Zn(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function Zb(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function Qb(t,e,n){const r=n.inline||!1;n.inline=!1;const i=t(e,n);return n.inline=r,i}const ev=(t,e,n)=>({children:Zn(e,t[2],n)});function Vr(){return{}}function tv(...t){return t.filter(Boolean).join(" ")}function Wr(t,e,n){let r=t;const i=e.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function zr(t,e,n,r){if(!e||!e.trim())return null;const i=e.match(rb);return i?i.reduce(function(s,o){const a=o.indexOf("=");if(a!==-1){const l=(function(u){return u.indexOf("-")!==-1&&u.match(bb)===null&&(u=u.replace(jb,function(h,y){return y.toUpperCase()})),u})(o.slice(0,a)).trim(),d=Ao[l]||l;if(d==="ref")return s;const f=s[d]=(function(u,h,y,m){return h==="style"?(function(p){const g=[];if(!p)return g;let x="",S=0,O="";for(let v=0;v<p.length;v++){const w=p[v];if(w==='"'||w==="'")O?w===O&&(O="",S--):(O=w,S++);else if(w==="("&&x.endsWith("url"))S++;else if(w===")"&&S>0)S--;else if(w===";"&&S===0){const j=x.indexOf(":");j>0&&g.push([x.slice(0,j).trim(),x.slice(j+1).trim()]),x="";continue}x+=w}const b=x.indexOf(":");return b>0&&g.push([x.slice(0,b).trim(),x.slice(b+1).trim()]),g})(y).reduce(function(p,[g,x]){return p[g.replace(/(-[a-z])/g,S=>S[1].toUpperCase())]=m(x,u,g),p},{}):nb.indexOf(h)!==-1?m(Ue(y),u,h):(y.match(vb)&&(y=Ue(y.slice(1,y.length-1))),y==="true"||y!=="false"&&y)})(t,l,(function(u){const h=u[0];return(h==='"'||h==="'")&&u.length>=2&&u[u.length-1]===h?u.slice(1,-1):u})(o.slice(a+1).trim()),n);typeof f=="string"&&(ts.test(f)||li.test(f))&&(s[d]=r(f.trim()))}else o!=="style"&&(s[Ao[o]||o]=!0);return s},{}):null}function Uo(t,e){for(let n=0;n<t.length;n++)if(t[n].test(e))return!0;return!1}function nv(t="",e={}){e.overrides=e.overrides||{},e.namedCodesToUnicode=e.namedCodesToUnicode?Ve({},Co,e.namedCodesToUnicode):Co;const n=e.slugify||ln,r=e.sanitizer||Jb,i=e.createElement||F.createElement,s=[_o,No,To,e.enforceAtxHeadings?Fo:Po,Eo,Do,tc,nc],o=[...s,Ob,ts,Io,li];function a(m,p,...g){const x=Wr(e.overrides,m+".props",{});return i((function(S,O){const b=Wr(O,S);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:Wr(O,S+".component",S):S})(m,e.overrides),Ve({},p,x,{className:tv(p?.className,x.className)||void 0}),...g)}function l(m){m=m.replace(pb,"");let p=!1;e.forceInline?p=!0:e.forceBlock||(p=Nb.test(m)===!1);const g=h(p?m:gn(m).replace(Rb,"")+`
|
|
15
|
+
|
|
16
|
+
`,{inline:p});if(e.ast)return g;const x=y(g);for(;ko(x[x.length-1])&&!x[x.length-1].trim();)x.pop();if(d.length&&x.push(a("footer",{key:"footer"},d.map(function(b){return a("div",{id:n(b.identifier,ln),key:b.identifier},b.identifier,y(h(b.footnote,{inline:!0})))}))),e.wrapper===null)return x;const S=e.wrapper||(p?"span":"div");let O;if(x.length>1||e.forceWrapper)O=x;else{if(x.length===1)return O=x[0],typeof O=="string"?a("span",{key:"outer"},O):O;O=null}return i(S,Ve({key:"outer"},e.wrapperProps),O)}const d=[],f={},u={0:{t:[">"],o:Ze(_o),u:1,i(m,p,g){const[,x,S]=m[0].replace(sb,"").match(ob);return{alert:x,children:p(S,g)}}},1:{t:[" "],o:ot(ab),u:1,i:Vr},2:{t:function(m,p){if(p.inline||p.simple)return!1;var g=m[0];return g==="-"||g==="*"||g==="_"},o:Ze(lb),u:1,i:Vr},3:{t:[" "],o:Ze(To),u:0,i:m=>({lang:void 0,text:Ue(gn(m[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:Ze(No),u:0,i:m=>({attrs:zr("code",m[3]||"",r,l),lang:m[2]||void 0,text:m[4],type:"3"})},5:{t:["`"],o:Wn(cb),u:3,i:m=>({text:Ue(m[2])})},6:{t:["[^"],o:Ze(fb),u:0,i:m=>(d.push({footnote:m[2],identifier:m[1]}),{})},7:{t:["[^"],o:ot(mb),u:1,i:m=>({target:"#"+n(m[1],ln),text:m[1]})},8:{t:["[ ]","[x]"],o:ot(gb),u:1,i:m=>({completed:m[1].toLowerCase()==="x"})},9:{t:["#"],o:Ze(e.enforceAtxHeadings?Fo:Po),u:1,i:(m,p,g)=>({children:Zn(p,m[2],g),id:n(m[2],ln),level:m[1].length})},10:{t:m=>{const p=m.indexOf(`
|
|
17
|
+
`);return p>0&&p<m.length-1&&(m[p+1]==="="||m[p+1]==="-")},o:Ze(Eo),u:1,i:(m,p,g)=>({children:Zn(p,m[1],g),level:m[2]==="="?1:2,type:"9"})},11:{t:["<"],o:ut(yb),u:1,i(m,p,g){const[,x]=m[3].match(Bb),S=RegExp("^"+x,"gm"),O=m[3].replace(S,""),b=Uo(o,O)?Qb:Zn,v=m[1].toLowerCase(),w=tb.indexOf(v)!==-1,j=(w?v:m[1]).trim(),A={attrs:zr(j,m[2],r,l),noInnerParse:w,tag:j};if(g.inAnchor=g.inAnchor||v==="a",w)A.text=m[3];else{const C=g.inHTML;g.inHTML=!0,A.children=b(p,O,g),g.inHTML=C}return g.inAnchor=!1,A}},13:{t:["<"],o:Bo(li),u:1,i(m){const p=m[1].trim();return{attrs:zr(p,m[2]||"",r,l),tag:p}}},12:{t:["<!--"],o:Bo(Io),u:1,i:()=>({})},14:{t:["!["],o:Wn(Kb),u:1,i:m=>({alt:Ue(m[1]),target:Ue(m[2]),title:Ue(m[3])})},15:{t:["["],o:ot(qb),u:3,i:(m,p,g)=>({children:Zb(p,m[1],g),target:Ue(m[2]),title:Ue(m[3])})},16:{t:function(m,p){return!(!p.inline||p.inAnchor)&&m[0]==="<"&&($e(m,":")||$e(m,"@")||$e(m,"/"))},o:ot(wb),u:0,i(m){let p=m[1],g=!1;return $e(p,"@")&&!$e(p,"//")&&(g=!0,p=p.replace("mailto:","")),{children:[{text:p,type:"27"}],target:g?"mailto:"+p:p,type:"15"}}},17:{t:(m,p)=>!p.inAnchor&&!e.disableAutoLink&&ci(m,"http"),o:ot(Sb),u:0,i:m=>({children:[{text:m[1],type:"27"}],target:m[1],title:void 0,type:"15"})},20:$o(0,1),30:$o(0,2),19:{t:[`
|
|
18
|
+
`],o:Ze(ub),u:3,i:Vr},21:{t:function(m,p){return!p.inline&&!p.simple},o:ut(function(m,p){if(p.inline||p.simple||p.inHTML&&!$e(m,`
|
|
19
|
+
|
|
20
|
+
`)&&!$e(p.prevCapture,`
|
|
21
|
+
|
|
22
|
+
`))return null;let g="",x=0;for(;;){const O=m.indexOf(`
|
|
23
|
+
`,x),b=m.slice(x,O===-1?void 0:O+1),v=m[x];if((v===">"||v==="#"||v==="|"||v==="`"||v==="~"||v==="*"||v==="-"||v==="_"||v===" ")&&Uo(s,b)||(g+=b,O===-1||!b.trim()))break;x=O+1}const S=gn(g);return S===""?null:[g,,S]}),u:3,i:ev},22:{t:["["],o:ot(Ab),u:0,i:m=>(f[m[1]]={target:m[2],title:m[4]},{})},23:{t:["!["],o:Wn(Cb),u:0,i:m=>({alt:m[1]?Ue(m[1]):void 0,ref:m[2]})},24:{t:m=>m[0]==="["&&!$e(m,"]("),o:ot(_b),u:0,i:(m,p,g)=>({children:p(m[1],g),fallbackChildren:m[0],ref:m[2]})},25:{t:["|"],o:Ze(Do),u:1,i:Yb},27:{o:ut(function(m,p){let g;return ci(m,":")&&(g=Db.exec(m)),g||Mb.exec(m)}),u:4,i(m){const p=m[0];return{text:$e(p,"&")?p.replace(xb,(g,x)=>e.namedCodesToUnicode[x]||g):p}}},34:{t:["*","_","~","="],o:ut(Q0),u:2,i:(m,p,g)=>({children:p(m[2],g),tag:m[1]})},28:{t:["\\"],o:Wn($b),u:1,i:m=>({text:m[1],type:"27"})}};e.disableParsingRawHTML===!0&&(delete u[11],delete u[13]);const h=(function(m){var p=Object.keys(m);function g(x,S){var O=[];if(S.prevCapture=S.prevCapture||"",x.trim())for(;x;)for(var b=0;b<p.length;){var v=p[b],w=m[v];if(!w.t||Gb(x,S,w.t)){var j=w.o(x,S);if(j&&j[0]){x=x.substring(j[0].length);var A=w.i(j,g,S);S.prevCapture+=j[0],A.type||(A.type=v),O.push(A);break}b++}else b++}return S.prevCapture="",O}return p.sort(function(x,S){return m[x].u-m[S].u||(x<S?-1:1)}),function(x,S){return g((function(O){return O.replace(db,`
|
|
24
|
+
`).replace(hb,"").replace(Tb," ")})(x),S)}})(u),y=(function(m,p,g,x,S){function O(b){return Array.isArray(b)?b.map(v=>"text"in v?v.text:""):"text"in b?b.text:""}return function b(v,w={}){const j=(w.renderDepth||0)+1;if(j>2500)return O(v);w.renderDepth=j;try{if(Array.isArray(v)){const C=w.key,T=[];let N=!1;for(let _=0;_<v.length;_++){w.key=_;const P=b(v[_],w),$=ko(P);$&&N?T[T.length-1]+=P:P!==null&&T.push(P),N=$}return w.key=C,w.renderDepth=j-1,T}const A=(function(C,T,N){const _=()=>(function(P,$,E,D,M,k,B){switch(P.type){case"0":{const W={key:E.key};return P.alert&&(W.className="markdown-alert-"+k(P.alert.toLowerCase(),ln),P.children.unshift({attrs:{},children:[{type:"27",text:P.alert}],noInnerParse:!0,type:"11",tag:"header"})),D("blockquote",W,$(P.children,E))}case"1":return D("br",{key:E.key});case"2":return D("hr",{key:E.key});case"3":return D("pre",{key:E.key},D("code",Ve({},P.attrs,{className:P.lang?"lang-"+P.lang:""}),P.text));case"5":return D("code",{key:E.key},P.text);case"7":return D("a",{key:E.key,href:M(P.target,"a","href")},D("sup",{key:E.key},P.text));case"8":return D("input",{checked:P.completed,key:E.key,readOnly:!0,type:"checkbox"});case"9":return D("h"+P.level,{id:P.id,key:E.key},$(P.children,E));case"11":return D(P.tag,Ve({key:E.key},P.attrs),P.text||(P.children?$(P.children,E):""));case"13":return D(P.tag,Ve({},P.attrs,{key:E.key}));case"14":return D("img",{key:E.key,alt:P.alt||void 0,title:P.title||void 0,src:M(P.target,"img","src")});case"15":return D("a",{key:E.key,href:M(P.target,"a","href"),title:P.title},$(P.children,E));case"23":return B[P.ref]?D("img",{key:E.key,alt:P.alt,src:M(B[P.ref].target,"img","src"),title:B[P.ref].title}):null;case"24":return B[P.ref]?D("a",{key:E.key,href:M(B[P.ref].target,"a","href"),title:B[P.ref].title},$(P.children,E)):D("span",{key:E.key},P.fallbackChildren);case"25":{const W=P;return D("table",{key:E.key},D("thead",null,D("tr",null,W.header.map(function(R,V){return D("th",{key:V,style:Ro(W,V)},$(R,E))}))),D("tbody",null,W.cells.map(function(R,V){return D("tr",{key:V},R.map(function(Q,ne){return D("td",{key:ne,style:Ro(W,ne)},$(Q,E))}))})))}case"27":return P.text;case"34":return D(P.tag,{key:E.key},$(P.children,E));case"20":case"30":return D(P.ordered?"ol":"ul",{key:E.key,start:P.type==="20"?P.start:void 0},P.items.map(function(W,R){return D("li",{key:R},$(W,E))}));case"19":return`
|
|
25
|
+
`;case"21":return D("p",{key:E.key},$(P.children,E));default:return null}})(C,T,N,p,g,x,S);return m?m(_,C,T,N):_()})(v,b,w);return w.renderDepth=j-1,A}catch(A){if(A instanceof RangeError&&A.message.includes("Maximum call stack"))return O(v);throw A}}})(e.renderRule,a,r,n,f);return l(t)}const Bn=t=>{let{children:e,options:n}=t,r=(function(i,s){if(i==null)return{};var o={};for(var a in i)if({}.hasOwnProperty.call(i,a)){if(s.indexOf(a)!==-1)continue;o[a]=i[a]}return o})(t,eb);return nv(e??"",Ve({},n,{wrapperProps:Ve({},n?.wrapperProps,r)}))},rc=Symbol("remove-this-key"),Lo=Symbol("reset");function rv(t,e){return Array.isArray(t.required)&&t.required.indexOf(e)!==-1}function iv(t,e){switch(e){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return t(K.NewStringDefault)}}function sv(t){const{fieldPathId:e,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:d,disabled:f,readonly:u,required:h,hideError:y,propertyName:m,handleKeyRename:p,handleRemoveProperty:g,addedByAdditionalProperties:x}=t,[S,O]=F.useState(!1),{globalFormOptions:b,fields:v}=r,{SchemaField:w}=v,j=Dt(Pe(m,b,e.path)),A=F.useCallback((_,P,$,E)=>{_===void 0&&x&&(_=""),a(_,P,$,E)},[a,x]),C=F.useCallback(_=>{m!==_&&O(!0),p(m,_)},[m,p]),T=F.useCallback(_=>{const{target:{value:P}}=_;C(P)},[C]),N=F.useCallback(()=>{g(m)},[m,g]);return c.jsx(w,{name:m,required:h,schema:n,uiSchema:i,errorSchema:s,fieldPathId:j,formData:o,wasPropertyKeyModified:S,onKeyRename:C,onKeyRenameBlur:T,onRemoveProperty:N,onChange:A,onBlur:l,onFocus:d,registry:r,disabled:f,readonly:u,hideError:y})}function ov(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:d,hideError:f,onBlur:u,onFocus:h,onChange:y,registry:m,title:p}=t,{fields:g,schemaUtils:x,translateString:S,globalUiOptions:O}=m,{OptionalDataControlsField:b}=g,v=x.retrieveSchema(e,r,!0),w=U(n,O),{properties:j={}}=v,A=t.childFieldPathId??s,C=w.title??v.title??p??o,T=w.description??v.description,N=Rn(m,v,a,n),_=Qt(r);let P=[];const $=F.useCallback((R,V)=>{const{duplicateKeySuffixSeparator:Q="-"}=U(n,O);let ne=0,ie=R;for(;X(V,ie);)ie=`${R}${Q}${++ne}`;return ie},[n,O]),E=F.useCallback(()=>{if(!(v.additionalProperties||v.patternProperties))return;const{translateString:R}=m,V={...r},Q=$("newKey",V);if(v.patternProperties)se(V,Q,null);else{let ne,ie,de;if(Z(v.additionalProperties)){ne=v.additionalProperties.type,ie=v.additionalProperties.const,de=v.additionalProperties.default;let z=v.additionalProperties;if(ce in z){const{schemaUtils:H}=m;z=H.retrieveSchema({[ce]:z[ce]},r),ne=z.type,ie=z.const,de=z.default}!ne&&(J in z||q in z)&&(ne="object")}const ee=ie??de??iv(R,ne);se(V,Q,ee)}y(V,A.path)},[r,y,m,A,$,v]),D=F.useCallback((R,V)=>{if(R!==V){const Q=$(V,r),ne={...r},ie={[R]:Q},de=Object.keys(ne).map(z=>({[ie[z]||z]:ne[z]})),ee=Object.assign({},...de);y(ee,A.path)}},[r,y,A,$]),M=F.useCallback(R=>{y(rc,[...A.path,R])},[y,A]);if(!N||_)try{const R=Object.keys(j);P=e0(R,w.order)}catch(R){return c.jsxs("div",{children:[c.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:c.jsx(Bn,{options:{disableParsingRawHTML:!0},children:S(K.InvalidObjectField,[o||"root",R.message])})}),c.jsx("pre",{children:JSON.stringify(v)})]})}const k=L("ObjectFieldTemplate",m,w),B=N?c.jsx(b,{...t,fieldPathId:A,schema:v}):void 0,W={title:w.label===!1?"":C,description:w.label===!1?void 0:T,properties:P.map(R=>{const V=X(v,[te,R,et]),Q=V?n.additionalProperties:n[R],ne=U(Q).widget==="hidden";return{content:c.jsx(sv,{propertyName:R,required:rv(v,R),schema:I(v,[te,R],{}),uiSchema:Q,errorSchema:I(i,[R]),fieldPathId:A,formData:I(r,[R]),handleKeyRename:D,handleRemoveProperty:M,addedByAdditionalProperties:V,onChange:y,onBlur:u,onFocus:h,registry:m,disabled:l,readonly:d,hideError:f},R),name:R,readonly:d,disabled:l,required:a,hidden:ne}}),readonly:d,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:v,formData:r,registry:m,optionalDataControl:B,className:N?"rjsf-optional-object-field":void 0};return c.jsx(k,{...W,onAddProperty:E})}function av(t){const{schema:e,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:d}=t,{globalUiOptions:f={},schemaUtils:u,translateString:h}=d,y=U(n,f),m=L("OptionalDataControlsTemplate",d,y),p=Qt(r);let g,x,S,O;if(i||s)g=Rr(l,"Msg"),x=p?void 0:h(K.OptionalObjectEmptyMsg);else{const b=p?K.OptionalObjectRemove:K.OptionalObjectAdd;x=h(b),p?(g=Rr(l,"Remove"),O=()=>o(void 0,l.path,a)):(g=Rr(l,"Add"),S=()=>{let v=u.getDefaultFormState(e,r,"excludeObjectChildren");v===void 0&&(v=Ie(e)==="array"?[]:{}),o(v,l.path,a)})}return x&&c.jsx(m,{id:g,registry:d,schema:e,uiSchema:n,label:x,onAddClick:S,onRemoveClick:O})}const lv={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function cv(t,e,n){const r=e.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=Ie(t),o=Array.isArray(s)?s[0]:s||"",a=t.$id;let l=lv[o];return a&&a in i&&(l=a),!l&&(t.anyOf||t.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function uv(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:d,onRemoveProperty:f,required:u=!1,registry:h,wasPropertyKeyModified:y=!1}=t,{schemaUtils:m,globalFormOptions:p,globalUiOptions:g,fields:x}=h,{AnyOfField:S,OneOfField:O}=x,b=U(r,g),v=L("FieldTemplate",h,b),w=L("DescriptionFieldTemplate",h,b),j=L("FieldHelpTemplate",h,b),A=L("FieldErrorTemplate",h,b),C=m.retrieveSchema(e,i),T=n[oe],N=F.useCallback((De,nn,Je,Pc)=>a(De,nn,Je,Pc||T),[T,a]),_=cv(C,b,h),P=!!(b.disabled??t.disabled),$=!!(b.readonly??(t.readonly||t.schema.readOnly||C.readOnly)),E=b.hideError,D=E===void 0?t.hideError:!!E,M=!!(b.autofocus??t.autofocus);if(Object.keys(C).length===0)return null;let k=m.getDisplayLabel(C,r,g);const B=b.field&&b.fieldReplacesAnyOrOneOf===!0;let W,R,V={fieldPathId:n};if((J in C||q in C)&&!B&&!m.isSelect(C)){C[J]?(W=S,R=C[J].map(Je=>m.retrieveSchema(Z(Je)?Je:{},i))):C[q]&&(W=O,R=C[q].map(Je=>m.retrieveSchema(Z(Je)?Je:{},i)));const De=Rn(h,C,u,r),nn=Qt(i);k=k&&(!De||nn),V={childFieldPathId:n,fieldPathId:Pe("XxxOf",p,n)}}const{__errors:Q,...ne}=s||{},ie=wn(r,["ui:classNames","classNames","ui:style"]);dt in ie&&(ie[dt]=wn(ie[dt],["classNames","style"]));const de=c.jsx(_,{...t,onChange:N,...V,schema:C,uiSchema:ie,disabled:P,readonly:$,hideError:D,autofocus:M,errorSchema:ne,rawErrors:Q}),ee=n[oe];let z;y?z=o:z=et in C?o:b.title||t.schema.title||C.title||t.title||o;const H=b.description||t.schema.description||C.description||"",re=b.help,fe=b.widget==="hidden",je=["rjsf-field",`rjsf-field-${Ie(C)}`];!D&&Q&&Q.length>0&&je.push("rjsf-field-error"),b.classNames&&je.push(b.classNames);const Se=c.jsx(j,{help:re,fieldPathId:n,schema:C,uiSchema:r,hasErrors:!D&&Q&&Q.length>0,registry:h}),pe=D||W&&!m.isSelect(C)?void 0:c.jsx(A,{errors:Q,errorSchema:s,fieldPathId:n,schema:C,uiSchema:r,registry:h}),Oe={description:c.jsx(w,{id:It(ee),description:H,schema:C,uiSchema:r,registry:h}),rawDescription:H,help:Se,rawHelp:typeof re=="string"?re:void 0,errors:pe,rawErrors:D?void 0:Q,fieldPathId:n,id:ee,label:z,hidden:fe,onChange:a,onKeyRename:l,onKeyRenameBlur:d,onRemoveProperty:f,required:u,disabled:P,readonly:$,hideError:D,displayLabel:k,classNames:je.join(" ").trim(),style:b.style,formData:i,schema:C,uiSchema:r,registry:h};return c.jsx(v,{...Oe,children:c.jsxs(c.Fragment,{children:[de,W&&c.jsx(W,{name:o,disabled:P,readonly:$,hideError:D,errorSchema:s,formData:i,fieldPathId:n,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:R,registry:h,required:u,schema:C,uiSchema:r})]})})}class dv extends F.Component{shouldComponentUpdate(e){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return Ll(this,e,this.state,r)}render(){return c.jsx(uv,{...this.props})}}function fv(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:d=!1,onChange:f,onBlur:u,onFocus:h,registry:y,rawErrors:m,hideError:p,title:g}=t,{title:x,format:S}=e,{widgets:O,schemaUtils:b,globalUiOptions:v}=y,w=b.isSelect(e)?Gt(e,r):void 0;let j=w?"select":"text";S&&Jx(e,S,O)&&(j=S);const{widget:A=j,placeholder:C="",title:T,...N}=U(r),_=b.getDisplayLabel(e,r,v),P=T??g??x??n,$=He(e,A,O),E=F.useCallback((D,M,k)=>f(D,i.path,M,k),[f,i]);return c.jsx($,{options:{...N,enumOptions:w},schema:e,uiSchema:r,id:i.$id,name:n,label:P,hideLabel:!_,hideError:p,value:s,onChange:E,onBlur:u,onFocus:h,required:o,disabled:a,readonly:l,autofocus:d,registry:y,placeholder:C,rawErrors:m,htmlName:i.name})}function mv(t){const{formData:e,onChange:n,fieldPathId:r}=t;return F.useEffect(()=>{e===void 0&&n(null,r.path)},[r,e,n]),null}function hv(){return{AnyOfField:jo,ArrayField:w0,BooleanField:j0,FallbackField:_0,LayoutGridField:es,LayoutHeaderField:G0,LayoutMultiSchemaField:H0,NumberField:J0,ObjectField:ov,OneOfField:jo,OptionalDataControlsField:av,SchemaField:dv,StringField:fv,NullField:mv}}function pv(t){const{fieldPathId:e,description:n,registry:r,schema:i,uiSchema:s}=t,o=U(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=L("DescriptionFieldTemplate",r,o);return c.jsx(l,{id:It(e),description:n,schema:i,uiSchema:s,registry:r})}function gv(t){const{children:e,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=t,d=U(l),f=L("ArrayFieldItemButtonsTemplate",a,d),u={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},h=s?31:9,y={display:"flex",alignItems:i?"center":"baseline"},m={display:"flex",justifyContent:"flex-end",marginTop:i?`${h}px`:0};return c.jsxs("div",{className:n,style:y,children:[c.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:e}),o&&c.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:c.jsx("div",{className:"btn-group",style:m,children:c.jsx(f,{...r,style:u})})})]})}function yv(t){const{disabled:e,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:d,onMoveUpItem:f,readonly:u,registry:h,uiSchema:y}=t,{CopyButton:m,MoveDownButton:p,MoveUpButton:g,RemoveButton:x}=h.templates.ButtonTemplates;return c.jsxs(c.Fragment,{children:[(i||r)&&c.jsx(g,{id:qe(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:e||u||!i,onClick:f,uiSchema:y,registry:h}),(i||r)&&c.jsx(p,{id:qe(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:e||u||!r,onClick:d,uiSchema:y,registry:h}),n&&c.jsx(m,{id:qe(o,"copy"),className:"rjsf-array-item-copy",disabled:e||u,onClick:a,uiSchema:y,registry:h}),s&&c.jsx(x,{id:qe(o,"remove"),className:"rjsf-array-item-remove",disabled:e||u,onClick:l,uiSchema:y,registry:h})]})}function xv(t){const{canAdd:e,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:d,registry:f,required:u,schema:h,title:y}=t,m=U(s),p=L("ArrayFieldDescriptionTemplate",f,m),g=L("ArrayFieldTitleTemplate",f,m),x=!d&&!r,{ButtonTemplates:{AddButton:S}}=f.templates;return c.jsxs("fieldset",{className:n,id:i.$id,children:[c.jsx(g,{fieldPathId:i,title:m.title||y,required:u,schema:h,uiSchema:s,registry:f,optionalDataControl:x?a:void 0}),c.jsx(p,{fieldPathId:i,description:m.description||h.description,schema:h,uiSchema:s,registry:f}),x?void 0:a,c.jsx("div",{className:"row array-item-list",children:o}),e&&c.jsx(S,{id:qe(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||d,uiSchema:s,registry:f})]})}function bv(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=t,l=U(i,o.globalUiOptions),{label:d=!0}=l;if(!n||!d)return null;const f=L("TitleFieldTemplate",o,l);return c.jsx(f,{id:gr(e),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function vv(t){const{id:e,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:d,onChange:f,onChangeOverride:u,options:h,schema:y,uiSchema:m,registry:p,rawErrors:g,type:x,hideLabel:S,hideError:O,...b}=t,{ClearButton:v}=p.templates.ButtonTemplates;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const w={...b,...Ml(y,x,h)};let j;w.type==="number"||w.type==="integer"?j=i||i===0?i:"":j=i??"";const A=F.useCallback(({target:{value:_}})=>f(_===""?h.emptyValue:_),[f,h]),C=F.useCallback(({target:_})=>l(e,_&&_.value),[l,e]),T=F.useCallback(({target:_})=>d(e,_&&_.value),[d,e]),N=F.useCallback(_=>{_.preventDefault(),_.stopPropagation(),f(h.emptyValue??"")},[f,h.emptyValue]);return c.jsxs(c.Fragment,{children:[c.jsx("input",{id:e,name:r||e,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:j,...w,list:y.examples?_n(e):void 0,onChange:u||A,onBlur:C,onFocus:T,"aria-describedby":we(e,!!y.examples)}),h.allowClearTextInputs&&!s&&!o&&j&&c.jsx(v,{registry:p,onClick:N}),Array.isArray(y.examples)&&c.jsx("datalist",{id:_n(e),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map(_=>c.jsx("option",{value:_},_))},`datalist_${e}`)]})}function Sv({uiSchema:t}){const{submitText:e,norender:n,props:r={}}=Rl(t);return n?null:c.jsx("div",{children:c.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:e})})}function bt(t){const{iconType:e="default",icon:n,className:r,uiSchema:i,registry:s,...o}=t;return c.jsx("button",{type:"button",className:`btn btn-${e} ${r}`,...o,children:c.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function wv(t){const{registry:{translateString:e}}=t;return c.jsx(bt,{title:e(K.CopyButton),...t,icon:"copy"})}function jv(t){const{registry:{translateString:e}}=t;return c.jsx(bt,{title:e(K.MoveDownButton),...t,icon:"arrow-down"})}function Ov(t){const{registry:{translateString:e}}=t;return c.jsx(bt,{title:e(K.MoveUpButton),...t,icon:"arrow-up"})}function Av(t){const{registry:{translateString:e}}=t;return c.jsx(bt,{title:e(K.RemoveButton),...t,iconType:"danger",icon:"remove"})}function Cv({id:t,className:e,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return c.jsx(bt,{id:t,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(K.ClearButton),onClick:n,disabled:r,registry:i,...s})}function _v({id:t,className:e,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return c.jsx("div",{className:"row",children:c.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${e}`,children:c.jsx(bt,{id:t,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(K.AddButton),onClick:n,disabled:r,registry:i})})})}function Nv(){return{SubmitButton:Sv,AddButton:_v,CopyButton:wv,MoveDownButton:jv,MoveUpButton:Ov,RemoveButton:Av,ClearButton:Cv}}const ic=Hi();function is({description:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return U(n,r).enableMarkdownInDescription&&typeof t=="string"?c.jsx(Bn,{options:{disableParsingRawHTML:!0},"data-testid":ic.markdown,children:t}):t}is.TEST_IDS=ic;function Tv(t){const{id:e,description:n,registry:r,uiSchema:i}=t;return n?c.jsx("div",{id:e,className:"field-description",children:c.jsx(is,{description:n,registry:r,uiSchema:i})}):null}function Pv({errors:t,registry:e}){const{translateString:n}=e;return c.jsxs("div",{className:"panel panel-danger errors",children:[c.jsx("div",{className:"panel-heading",children:c.jsx("h3",{className:"panel-title",children:n(K.ErrorsLabel)})}),c.jsx("ul",{className:"list-group",children:t.map((r,i)=>c.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function Fv(t){const{schema:e,registry:n,typeSelector:r,schemaField:i}=t,s=L("MultiSchemaFieldTemplate",n);return c.jsx(s,{selector:r,optionSchemaField:i,schema:e,registry:n})}const Ev="*";function sc(t){const{label:e,required:n,id:r}=t;return e?c.jsxs("label",{className:"control-label",htmlFor:r,children:[e,n&&c.jsx("span",{className:"required",children:Ev})]}):null}function Iv(t){const{id:e,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:d,registry:f,uiSchema:u}=t,h=U(u),y=L("WrapIfAdditionalTemplate",f,h);if(a)return c.jsx("div",{className:"hidden",children:r});const m=h.widget==="checkbox";return c.jsxs(y,{...t,children:[d&&!m&&c.jsx(sc,{label:n,required:l,id:e}),d&&o?o:null,r,i,s]})}function Dv(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=Yi(n);return c.jsx("div",{children:c.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:e.filter(i=>!!i).map((i,s)=>c.jsx("li",{className:"text-danger",children:i},s))})})}const oc=Hi();function ss({help:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return U(n,r).enableMarkdownInHelp&&typeof t=="string"?c.jsx(Bn,{options:{disableParsingRawHTML:!0},"data-testid":oc.markdown,children:t}):t}ss.TEST_IDS=oc;function $v(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i}=t;return n?c.jsx("div",{id:Xi(e),className:"help-block",children:c.jsx(ss,{help:n,registry:i,uiSchema:r})}):null}function kv(t){const{children:e,column:n,className:r,...i}=t;return c.jsx("div",{className:r,...i,children:e})}function Mv(t){const{selector:e,optionSchemaField:n}=t;return c.jsxs("div",{className:"panel panel-default panel-body",children:[c.jsx("div",{className:"form-group",children:e}),n]})}function Rv(t){const{className:e,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:d,registry:f,required:u,schema:h,title:y,uiSchema:m}=t,p=U(m),g=L("TitleFieldTemplate",f,p),x=L("DescriptionFieldTemplate",f,p);if((h.oneOf||h.anyOf)&&!h.properties&&l.length===0)return null;const O=!d&&!r,{ButtonTemplates:{AddButton:b}}=f.templates;return c.jsxs("fieldset",{className:e,id:s.$id,children:[y&&c.jsx(g,{id:gr(s),title:y,required:u,schema:h,uiSchema:m,registry:f,optionalDataControl:O?a:void 0}),n&&c.jsx(x,{id:It(s),description:n,schema:h,uiSchema:m,registry:f}),O?void 0:a,l.map(v=>v.content),xa(h,m,i)&&c.jsx(b,{id:qe(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||d,uiSchema:m,registry:f})]})}function Bv(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?c.jsx(bt,{id:e,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?c.jsx(bt,{id:e,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):c.jsx("em",{id:e,children:r})}const Uv="*";function Lv(t){const{id:e,title:n,required:r,optionalDataControl:i}=t;return c.jsxs("legend",{id:e,children:[n,r&&c.jsx("span",{className:"required",children:Uv}),i&&c.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function Vv(t){const{schema:e,fieldPathId:n,reason:r,registry:i}=t,{translateString:s}=i;let o=K.UnsupportedField;const a=[];return n&&n.$id&&(o=K.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===K.UnsupportedField?K.UnsupportedFieldWithReason:K.UnsupportedFieldWithIdAndReason,a.push(r)),c.jsxs("div",{className:"unsupported-field",children:[c.jsx("p",{children:c.jsx(Bn,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),e&&c.jsx("pre",{children:JSON.stringify(e,null,2)})]})}function Wv(t){const{id:e,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:d,readonly:f,required:u,schema:h,hideError:y,rawErrors:m,children:p,uiSchema:g,registry:x}=t,{templates:S,translateString:O}=x,{RemoveButton:b}=S.ButtonTemplates,v=O(K.KeyLabel,[o]),w=et in h,j=!!d,A=["form-group",n];!y&&m&&m.length>0&&A.push("has-error has-danger");const C=A.join(" ").trim();if(!w)return c.jsx("div",{className:C,style:r,children:p});const T=j?46:26;return c.jsx("div",{className:C,style:r,children:c.jsxs("div",{className:"row",children:[c.jsx("div",{className:"col-xs-5 form-additional",children:c.jsxs("div",{className:"form-group",children:[s&&c.jsx(sc,{label:v,required:u,id:`${e}-key`}),s&&d&&c.jsx("div",{children:" "}),c.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:a,defaultValue:o})]})}),c.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),c.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${T}px`:void 0},children:c.jsx(b,{id:qe(e,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||f,onClick:l,uiSchema:g,registry:x})})]})})}function zv(){return{ArrayFieldDescriptionTemplate:pv,ArrayFieldItemTemplate:gv,ArrayFieldItemButtonsTemplate:yv,ArrayFieldTemplate:xv,ArrayFieldTitleTemplate:bv,ButtonTemplates:Nv(),BaseInputTemplate:vv,DescriptionFieldTemplate:Tv,ErrorListTemplate:Pv,FallbackFieldTemplate:Fv,FieldTemplate:Iv,FieldErrorTemplate:Dv,FieldHelpTemplate:$v,GridTemplate:kv,MultiSchemaFieldTemplate:Mv,ObjectFieldTemplate:Rv,OptionalDataControlsTemplate:Bv,TitleFieldTemplate:Lv,UnsupportedFieldTemplate:Vv,WrapIfAdditionalTemplate:Wv}}function qv(t){const{disabled:e=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:d}=t,{translateString:f}=a,{elements:u,handleChange:h,handleClear:y,handleSetNow:m}=i0(t);return c.jsxs("ul",{className:"list-inline",children:[u.map((p,g)=>c.jsx("li",{className:"list-inline-item",children:c.jsx(r0,{rootId:s,name:o,select:h,...p,disabled:e,readonly:n,registry:a,onBlur:l,onFocus:d,autofocus:r&&g===0})},g)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&c.jsx("li",{className:"list-inline-item",children:c.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:m,children:f(K.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&c.jsx("li",{className:"list-inline-item",children:c.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:y,children:f(K.ClearLabel)})})]})}function Kv({time:t=!0,...e}){const{AltDateWidget:n}=e.registry.widgets;return c.jsx(n,{time:t,...e})}function Gv({schema:t,uiSchema:e,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:d=!1,onBlur:f,onFocus:u,onChange:h,registry:y,htmlName:m}){const p=L("DescriptionFieldTemplate",y,n),g=hn(t),x=F.useCallback(j=>h(j.target.checked),[h]),S=F.useCallback(j=>f(r,j.target.checked),[f,r]),O=F.useCallback(j=>u(r,j.target.checked),[u,r]),w=U(e).widget==="checkbox"?void 0:n.description??t.description;return c.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&w&&c.jsx(p,{id:It(r),description:w,schema:t,uiSchema:e,registry:y}),c.jsxs("label",{children:[c.jsx("input",{type:"checkbox",id:r,name:m||r,checked:typeof i>"u"?!1:i,required:g,disabled:s||o,autoFocus:d,onChange:x,onBlur:S,onFocus:O,"aria-describedby":we(r)}),Ul(c.jsx("span",{children:a}),l)]})]})}function Hv({id:t,disabled:e,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:s},value:o,autofocus:a=!1,readonly:l,onChange:d,onBlur:f,onFocus:u,htmlName:h}){const y=Array.isArray(o)?o:[o],m=F.useCallback(({target:g})=>f(t,ge(g&&g.value,r,s)),[f,t,r,s]),p=F.useCallback(({target:g})=>u(t,ge(g&&g.value,r,s)),[u,t,r,s]);return c.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(r)&&r.map((g,x)=>{const S=Mn(g.value,y),O=Array.isArray(i)&&i.indexOf(g.value)!==-1,b=e||O||l?"disabled":"",v=j=>{j.target.checked?d(Dl(x,y,r)):d(El(x,y,r))},w=c.jsxs("span",{children:[c.jsx("input",{type:"checkbox",id:jt(t,x),name:h||t,checked:S,value:String(x),disabled:e||O||l,autoFocus:a&&x===0,onChange:v,onBlur:m,onFocus:p,"aria-describedby":we(t)}),c.jsx("span",{children:g.label})]});return n?c.jsx("label",{className:`checkbox-inline ${b}`,children:w},x):c.jsx("div",{className:`checkbox ${b}`,children:c.jsx("label",{children:w})},x)})})}function Yv(t){const{disabled:e,readonly:n,options:r,registry:i}=t,s=L("BaseInputTemplate",i,r);return c.jsx(s,{type:"color",...t,disabled:e||n})}function Xv(t){const{onChange:e,options:n,registry:r}=t,i=L("BaseInputTemplate",r,n),s=F.useCallback(o=>e(o||void 0),[e]);return c.jsx(i,{type:"date",...t,onChange:s})}function Jv(t){const{onChange:e,value:n,options:r,registry:i}=t,s=L("BaseInputTemplate",i,r);return c.jsx(s,{type:"datetime-local",...t,value:c0(n),onChange:o=>e(Qx(o))})}function Zv(t){const{options:e,registry:n}=t,r=L("BaseInputTemplate",n,e);return c.jsx(r,{type:"email",...t})}function Qv({fileInfo:t,registry:e}){const{translateString:n}=e,{dataURL:r,type:i,name:s}=t;return r?["image/jpeg","image/png"].includes(i)?c.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):c.jsxs(c.Fragment,{children:[" ",c.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(K.PreviewLabel)})]}):null}function e1({filesInfo:t,registry:e,preview:n,onRemove:r,options:i}){if(t.length===0)return null;const{translateString:s}=e,{RemoveButton:o}=L("ButtonTemplates",e,i);return c.jsx("ul",{className:"file-info",children:t.map((a,l)=>{const{name:d,size:f,type:u}=a,h=()=>r(l);return c.jsxs("li",{children:[c.jsx(Bn,{children:s(K.FilesInfo,[d,u,String(f)])}),n&&c.jsx(Qv,{fileInfo:a,registry:e}),c.jsx(o,{onClick:h,registry:e})]},l)})})}function t1(t){const{disabled:e,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=t,{filesInfo:d,handleChange:f,handleRemove:u}=l0(o,s,i),h=L("BaseInputTemplate",l,a),y=m=>{m.target.files&&f(m.target.files)};return c.jsxs("div",{children:[c.jsx(h,{...t,disabled:e||n,type:"file",required:o?!1:r,onChangeOverride:y,value:"",accept:a.accept?String(a.accept):void 0}),c.jsx(e1,{filesInfo:d,onRemove:u,registry:l,preview:a.filePreview,options:a})]})}function n1({id:t,value:e,htmlName:n}){return c.jsx("input",{type:"hidden",id:t,name:n||t,value:typeof e>"u"?"":e})}function r1(t){const{options:e,registry:n}=t,r=L("BaseInputTemplate",n,e);return c.jsx(r,{type:"password",...t})}function i1({options:t,value:e,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:d,htmlName:f}){const{enumOptions:u,enumDisabled:h,inline:y,emptyValue:m}=t,p=F.useCallback(({target:x})=>o(d,ge(x&&x.value,u,m)),[o,u,m,d]),g=F.useCallback(({target:x})=>a(d,ge(x&&x.value,u,m)),[a,u,m,d]);return c.jsx("div",{className:"field-radio-group",id:d,role:"radiogroup",children:Array.isArray(u)&&u.map((x,S)=>{const O=Mn(x.value,e),b=Array.isArray(h)&&h.indexOf(x.value)!==-1,v=r||b||i?"disabled":"",w=()=>l(x.value),j=c.jsxs("span",{children:[c.jsx("input",{type:"radio",id:jt(d,S),checked:O,name:f||d,required:n,value:String(S),disabled:r||b||i,autoFocus:s&&S===0,onChange:w,onBlur:p,onFocus:g,"aria-describedby":we(d)}),c.jsx("span",{children:x.label})]});return y?c.jsx("label",{className:`radio-inline ${v}`,children:j},S):c.jsx("div",{className:`radio ${v}`,children:c.jsx("label",{children:j})},S)})})}function s1(t){const{value:e,registry:{templates:{BaseInputTemplate:n}}}=t;return c.jsxs("div",{className:"field-range-wrapper",children:[c.jsx(n,{type:"range",...t}),c.jsx("span",{className:"range-view",children:e})]})}function o1({id:t,value:e,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:d,options:f,htmlName:u}){const{stars:h=5,shape:y="star"}=f,m=d.maximum?Math.min(d.maximum,5):Math.min(Math.max(h,1),5),p=d.minimum||0,g=F.useCallback(b=>{!r&&!i&&o(b)},[o,r,i]),x=F.useCallback(b=>{if(a){const v=Number(b.target.dataset.value);a(t,v)}},[a,t]),S=F.useCallback(b=>{if(l){const v=Number(b.target.dataset.value);l(t,v)}},[l,t]),O=b=>y==="heart"?b?"♥":"♡":b?"★":"☆";return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(m)].map((b,v)=>{const w=p+v,j=w<=e;return c.jsx("span",{onClick:()=>g(w),onFocus:x,onBlur:S,"data-value":w,tabIndex:r||i?-1:0,role:"radio","aria-checked":w===e,"aria-label":`${w} ${y==="heart"?"heart":"star"}${w===1?"":"s"}`,style:{color:j?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:O(j)},v)}),c.jsx("input",{type:"hidden",id:t,name:u||t,value:e||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function qr(t,e){return e?Array.from(t.target.options).slice().filter(n=>n.selected).map(n=>n.value):t.target.value}function a1({schema:t,id:e,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:d,onBlur:f,onFocus:u,placeholder:h,htmlName:y}){const{enumOptions:m,enumDisabled:p,emptyValue:g}=n,x=a?[]:"",S=F.useCallback(j=>{const A=qr(j,a);return u(e,ge(A,m,g))},[u,e,a,m,g]),O=F.useCallback(j=>{const A=qr(j,a);return f(e,ge(A,m,g))},[f,e,a,m,g]),b=F.useCallback(j=>{const A=qr(j,a);return d(ge(A,m,g))},[d,a,m,g]),v=Il(r,m,a),w=!a&&t.default===void 0;return c.jsxs("select",{id:e,name:y||e,multiple:a,role:"combobox",className:"form-control",value:typeof v>"u"?x:v,required:i,disabled:s||o,autoFocus:l,onBlur:O,onFocus:S,onChange:b,"aria-describedby":we(e),children:[w&&c.jsx("option",{value:"",children:h}),Array.isArray(m)&&m.map(({value:j,label:A},C)=>{const T=p&&p.indexOf(j)!==-1;return c.jsx("option",{value:String(C),disabled:T,children:A},C)})]})}function l1({id:t,options:e={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:d,onFocus:f,htmlName:u}){const h=F.useCallback(({target:{value:p}})=>l(p===""?e.emptyValue:p),[l,e.emptyValue]),y=F.useCallback(({target:p})=>d(t,p&&p.value),[d,t]),m=F.useCallback(({target:p})=>f(t,p&&p.value),[t,f]);return c.jsx("textarea",{id:t,name:u||t,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:e.rows,onBlur:y,onFocus:m,onChange:h,"aria-describedby":we(t)})}function c1(t){const{options:e,registry:n}=t,r=L("BaseInputTemplate",n,e);return c.jsx(r,{...t})}function u1(t){const{onChange:e,options:n,registry:r}=t,i=L("BaseInputTemplate",r,n),s=F.useCallback(o=>e(o?`${o}:00`:void 0),[e]);return c.jsx(i,{type:"time",...t,onChange:s})}function d1(t){const{options:e,registry:n}=t,r=L("BaseInputTemplate",n,e);return c.jsx(r,{type:"url",...t})}function f1(t){const{options:e,registry:n}=t,r=L("BaseInputTemplate",n,e);return c.jsx(r,{type:"number",...t})}function m1(){return{AltDateWidget:qv,AltDateTimeWidget:Kv,CheckboxWidget:Gv,CheckboxesWidget:Hv,ColorWidget:Yv,DateWidget:Xv,DateTimeWidget:Jv,EmailWidget:Zv,FileWidget:t1,HiddenWidget:n1,PasswordWidget:r1,RadioWidget:i1,RangeWidget:s1,RatingWidget:o1,SelectWidget:a1,TextWidget:c1,TextareaWidget:l1,TimeWidget:u1,UpDownWidget:f1,URLWidget:d1}}function h1(){return{fields:hv(),templates:zv(),widgets:m1(),rootSchema:{},formContext:{},translateString:Mx,globalFormOptions:{idPrefix:pa,idSeparator:ga,useFallbackUiForUnsupportedType:!1}}}function kt(t,e){return{...Ki(t,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...e!==void 0&&{status:e}}}let p1=class extends F.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;constructor(e){if(super(e),!e.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=e,s=n??r;this.state=this.getStateFromProps(e,s,void 0,void 0,void 0,!0),i&&!le(this.state.formData,s)&&i(kt(this.state)),this.formElement=F.createRef()}getSnapshotBeforeUpdate(e,n){if(!le(this.props,e)){const r=mo(this.props.formData,e.formData),i=mo(this.props.formData,this.state.formData),s=!le(e.schema,this.props.schema),o=r.length>0||!le(e.formData,this.props.formData),a=i.length>0||!le(this.state.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,s||o?void 0:this.state.retrievedSchema,s,r,!a),d=!le(l,n);return{nextState:l,shouldUpdate:d}}return{shouldUpdate:!1}}componentDidUpdate(e,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!le(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!le(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(kt(i)),this.setState(i)}}getStateFromProps(e,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in e?e.schema:this.props.schema,d="validator"in e?e.validator:this.props.validator,f=("uiSchema"in e?e.uiSchema:this.props.uiSchema)||{},u=e.formData===void 0&&this.props.formData===void 0,h=typeof n<"u",y="liveValidate"in e?e.liveValidate:this.props.liveValidate,m=h&&!e.noValidate&&y,p="experimental_defaultFormStateBehavior"in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,g="experimental_customMergeAllOf"in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let x=a.schemaUtils;(!x||x.doesSchemaUtilsDiffer(d,l,p,g))&&(x=Dx(d,l,p,g));const S=x.getRootSchema();let O=n;n===Lo?O=void 0:n===void 0&&u&&(O=a.formData);const b=x.getDefaultFormState(S,O,!1,a.initialDefaultsGenerated),v=this.updateRetrievedSchema(r??x.retrieveSchema(S,b)),w=()=>e.noValidate||i?{errors:[],errorSchema:{}}:e.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let j,A,C=a.schemaValidationErrors,T=a.schemaValidationErrorSchema;if(m&&!o){const E=this.liveValidate(S,x,a.errorSchema,b,void 0,a.customErrors,r,r!==void 0);j=E.errors,A=E.errorSchema,C=E.schemaValidationErrors,T=E.schemaValidationErrorSchema}else{const E=w();if(j=E.errors,A=E.errorSchema,s.length>0&&!m){const M=s.reduce((k,B)=>(k[B]=void 0,k),{});A=T=Cn(E.errorSchema,M,"preventDuplicates")}const D=this.mergeErrors({errorSchema:A,errors:j},e.extraErrors,a.customErrors);j=D.errors,A=D.errorSchema}const N=this.getRegistry(e,S,x),_=le(a.registry,N)?a.registry:N,P=a.fieldPathId&&a.fieldPathId?.[oe]===_.globalFormOptions.idPrefix?a.fieldPathId:Pe("",_.globalFormOptions);return{schemaUtils:x,schema:S,uiSchema:f,fieldPathId:P,formData:b,edit:h,errors:j,errorSchema:A,schemaValidationErrors:C,schemaValidationErrorSchema:T,retrievedSchema:v,initialDefaultsGenerated:!0,registry:_}}shouldComponentUpdate(e,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return Ll(this,e,n,r)}validate(e,n=this.state.schema,r,i){const s=r||this.state.schemaUtils,{customValidate:o,transformErrors:a,uiSchema:l}=this.props,d=i??s.retrieveSchema(n,e);return s.getValidator().validateFormData(e,d,o,a,l)}renderErrors(e){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=U(s),a=L("ErrorListTemplate",e,o);return n&&n.length?c.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:e}):null}mergeErrors(e,n,r){let i=e.errorSchema,s=e.errors;if(n){const o=Jn(e,n);i=o.errorSchema,s=o.errors}if(r){const o=Jn(e,r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(e,n,r,i,s,o,a,l=!1){const d=this.validate(i,e,n,a),f=d.errors;let u=d.errorSchema;l&&(u=Cn(r,d.errorSchema,"preventDuplicates"));const h=f,y=u;return{...this.mergeErrors({errorSchema:u,errors:f},s,o),schemaValidationErrors:h,schemaValidationErrorSchema:y}}getUsedFormData=(e,n)=>Tl(e,n);getFieldNames=(e,n)=>Pl(e,n);omitExtraData=e=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,e)};setFieldValue=(e,n)=>{const{registry:r}=this.state,i=Array.isArray(e)?e:e.split("."),s=Pe("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[oe])};onChange=(e,n,r,i)=>{this.pendingChanges.push({newValue:e,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:e,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:o,liveOmit:a,noValidate:l,liveValidate:d,onChange:f}=this.props,{formData:u,schemaUtils:h,schema:y,fieldPathId:m,schemaValidationErrorSchema:p,errors:g}=this.state;let{customErrors:x,errorSchema:S}=this.state;const O=m.path[0]||"",b=!n||n.length===0||n.length===1&&n[0]===O;let v=this.state.retrievedSchema,w=b?e:Gi(u);const j=Y(w)&&Object.keys(w).length>0&&Object.values(w).every(P=>P===void 0),A=u==null,C=j&&A?void 0:w;if(Y(w)||Array.isArray(w)){e===rc?m0(w,n):b||se(w,n,e);const P=this.getStateFromProps(this.props,C,void 0,void 0,void 0,!0);w=P.formData,v=P.retrievedSchema}const T=!l&&(d===!0||d==="onChange");let N={formData:w,schema:y},_=w;if(o===!0&&(a===!0||a==="onChange")&&(_=this.omitExtraData(w),N={formData:_}),i){const P=b?p:I(p,n);if(!me(P))b?S=i:se(S,n,i);else if(x||(x=new $l),b){const $=I(i,xe);$&&x.setErrors($)}else se(x.ErrorSchema,n,i)}else x&&I(x.ErrorSchema,[...n,xe])&&x.clearErrors(n);if(T&&this.pendingChanges.length===1){const P=this.liveValidate(y,h,S,_,s,x,v);N={formData:_,...P,customErrors:x}}else if(!l&&i){const P=this.mergeErrors({errorSchema:S,errors:g},s,x);N={formData:_,...P,customErrors:x}}this.setState(N,()=>{f&&f(kt({...this.state,...N}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return le(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{const{formData:e,initialFormData:n=Lo,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,e??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(kt({...this.state,...o})))};onBlur=(e,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o}=this.props;if(r&&r(e,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:a,extraErrors:l}=this.props,{formData:d}=this.state;let f=d,u={formData:f};if(i===!0&&s==="onBlur"&&(f=this.omitExtraData(d),u={formData:f}),o==="onBlur"){const{schema:y,schemaUtils:m,errorSchema:p,customErrors:g,retrievedSchema:x}=this.state,S=this.liveValidate(y,m,p,f,l,g,x);u={formData:f,...S,customErrors:g}}const h=Object.keys(u).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const m=I(this.state,y),p=I(u,y);return!le(m,p)});this.setState(u,()=>{a&&h&&a(kt({...this.state,...u}),e)})}};onFocus=(e,n)=>{const{onFocus:r}=this.props;r&&r(e,n)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:s}=this.props;let{formData:o}=this.state;if(n===!0&&(o=this.omitExtraData(o)),i||this.validateFormWithFormData(o)){const a=r||{},l=r?Zi(r):[];this.setState({formData:o,errors:l,errorSchema:a,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(kt({...this.state,formData:o},"submitted"),e)})}};getGlobalFormOptions(e){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=ga,idPrefix:s=pa,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=e;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(e,n,r){const{translateString:i,uiSchema:s={}}=e,{fields:o,templates:a,widgets:l,formContext:d,translateString:f}=h1();return{fields:{...o,...e.fields},templates:{...a,...e.templates,ButtonTemplates:{...a.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...l,...e.widgets},rootSchema:n,formContext:e.formContext||d,schemaUtils:r,translateString:i||f,globalUiOptions:s[Yr],globalFormOptions:this.getGlobalFormOptions(e)}}submit=()=>{if(this.formElement.current){const e=new CustomEvent("submit",{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=e,s=Vl(i);s[0]===""?s[0]=n:s.unshift(n);const o=s.join(r);let a=this.formElement.current.elements[o];a||(a=this.formElement.current.querySelector(`input[id^="${o}"`)),a&&a.length&&(a=a[0]),a&&a.focus()}validateFormWithFormData=e=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(e);let l=a.errors,d=a.errorSchema;const f=l,u=d,h=l.length>0||n&&r;if(h){if(n){const y=Jn(a,n);d=y.errorSchema,l=y.errors}i&&(typeof i=="function"?i(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:d,schemaValidationErrors:f,schemaValidationErrorSchema:u},()=>{s?s(l):console.error("Form validation failed",l)})}else o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!h};validateForm(){const{omitExtraData:e}=this.props;let{formData:n}=this.state;return e===!0&&(n=this.omitExtraData(n)),this.validateFormWithFormData(n)}render(){const{children:e,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:d,enctype:f,acceptCharset:u,noHtml5Validate:h=!1,disabled:y,readonly:m,showErrorList:p="top",_internalFormWrapper:g}=this.props,{schema:x,uiSchema:S,formData:O,errorSchema:b,fieldPathId:v,registry:w}=this.state,{SchemaField:j}=w.fields,{SubmitButton:A}=w.templates.ButtonTemplates,C=g?i:void 0,T=g||i||"form";let{[tr]:N={}}=U(S);y&&(N={...N,props:{...N.props,disabled:!0}});const _={[dt]:{[tr]:N}};return c.jsxs(T,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:d,encType:f,acceptCharset:u,noValidate:h,onSubmit:this.onSubmit,as:C,ref:this.formElement,children:[p==="top"&&this.renderErrors(w),c.jsx(j,{name:"",schema:x,uiSchema:S,errorSchema:b,fieldPathId:v,formData:O,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:w,disabled:y,readonly:m}),e||c.jsx(A,{uiSchema:_,registry:w}),p==="bottom"&&this.renderErrors(w)]})}};function g1(t){return F.forwardRef(({fields:e,widgets:n,templates:r,...i},s)=>(e={...t?.fields,...e},n={...t?.widgets,...n},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},c.jsx(p1,{...t,...i,fields:e,widgets:n,templates:r,ref:s})))}var zn={exports:{}},Kr={},Vo;function y1(){return Vo||(Vo=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(C,T){return{validate:C,compare:T}}t.fullFormats={date:e(s,o),time:e(l,d),"date-time":e(u,h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:A,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:x,int32:{type:"number",validate:b},int64:{type:"number",validate:v},float:{type:"number",validate:w},double:{type:"number",validate:w},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function n(C){return C%4===0&&(C%100!==0||C%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(C){const T=r.exec(C);if(!T)return!1;const N=+T[1],_=+T[2],P=+T[3];return _>=1&&_<=12&&P>=1&&P<=(_===2&&n(N)?29:i[_])}function o(C,T){if(C&&T)return C>T?1:C<T?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(C,T){const N=a.exec(C);if(!N)return!1;const _=+N[1],P=+N[2],$=+N[3],E=N[5];return(_<=23&&P<=59&&$<=59||_===23&&P===59&&$===60)&&(!T||E!=="")}function d(C,T){if(!(C&&T))return;const N=a.exec(C),_=a.exec(T);if(N&&_)return C=N[1]+N[2]+N[3]+(N[4]||""),T=_[1]+_[2]+_[3]+(_[4]||""),C>T?1:C<T?-1:0}const f=/t|\s/i;function u(C){const T=C.split(f);return T.length===2&&s(T[0])&&l(T[1],!0)}function h(C,T){if(!(C&&T))return;const[N,_]=C.split(f),[P,$]=T.split(f),E=o(N,P);if(E!==void 0)return E||d(_,$)}const y=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(C){return y.test(C)&&m.test(C)}const g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function x(C){return g.lastIndex=0,g.test(C)}const S=-2147483648,O=2**31-1;function b(C){return Number.isInteger(C)&&C<=O&&C>=S}function v(C){return Number.isInteger(C)}function w(){return!0}const j=/[^\\]\\Z/;function A(C){if(j.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})(Kr)),Kr}var Gr={},Wo;function x1(){return Wo||(Wo=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=Mc(),n=Ho(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:d,schemaCode:f,keyword:u,it:h}=a,{opts:y,self:m}=h;if(!y.validateFormats)return;const p=new e.KeywordCxt(h,m.RULES.all.format.definition,"format");p.$data?g():x();function g(){const O=l.scopeValue("formats",{ref:m.formats,code:y.code.formats}),b=l.const("fmt",n._`${O}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${b} != "object"`,n._`${b} instanceof RegExp`,n._`typeof ${b}.compare != "function"`,S(b)))}function x(){const O=p.schema,b=m.formats[O];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${u}": format "${O}" does not define "compare" function`);const v=l.scopeValue("formats",{key:O,ref:b,code:y.code.formats?n._`${y.code.formats}${n.getProperty(O)}`:void 0});a.fail$data(S(v))}function S(O){return n._`${O}.compare(${d}, ${f}) ${i[u].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(Gr)),Gr}var zo;function b1(){return zo||(zo=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=y1(),r=x1(),i=Ho(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(d,f={keywords:!0})=>{if(Array.isArray(f))return l(d,f,n.fullFormats,s),d;const[u,h]=f.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],y=f.formats||n.formatNames;return l(d,y,u,h),f.keywords&&r.default(d),d};a.get=(d,f="full")=>{const h=(f==="fast"?n.fastFormats:n.fullFormats)[d];if(!h)throw new Error(`Unknown format "${d}"`);return h};function l(d,f,u,h){var y,m;(y=(m=d.opts.code).formats)!==null&&y!==void 0||(m.formats=i._`require("ajv-formats/dist/formats").${h}`);for(const p of f)d.addFormat(p,u[p])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(zn,zn.exports)),zn.exports}var v1=b1();const qo=mi(v1),S1={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},w1=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,j1=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function O1(t,e,n={},r,i=Rc,s){let o=new i({...S1,...n});return r?qo(o,r):r!==!1&&qo(o),o.addFormat("data-url",j1),o.addFormat("color",w1),o.addKeyword(et),o.addKeyword(Si),Array.isArray(t)&&o.addMetaSchema(t),Z(e)&&Object.keys(e).forEach(a=>{o.addFormat(a,e[a])}),s&&(o=s(o)),o}function A1(t=[],e){return t.map(r=>{var i;const{instancePath:s,keyword:o,params:a,schemaPath:l,parentSchema:d,...f}=r;let{message:u=""}=f,h=s.replace(/\//g,"."),y=`${h} ${u}`.trim(),m="";const p=[...((i=a.deps)===null||i===void 0?void 0:i.split(", "))||[],a.missingProperty,a.property].filter(g=>g);if(p.length>0)p.forEach(g=>{const x=h?`${h}.${g}`:g;let S=U(I(e,`${x.replace(/^\./,"")}`)).title;if(S===void 0){const O=l.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([g]);S=U(I(e,O)).title}if(S)u=u.replace(`'${g}'`,`'${S}'`),m=S;else{const O=I(d,[te,g,"title"]);O&&(u=u.replace(`'${g}'`,`'${O}'`),m=O)}}),y=u;else{const g=U(I(e,`${h.replace(/^\./,"")}`)).title;if(g)y=`'${g}' ${u}`.trim(),m=g;else{const x=d?.title;x&&(y=`'${x}' ${u}`.trim(),m=x)}}return"missingProperty"in a&&(h=h?`${h}.${a.missingProperty}`:a.missingProperty),{name:o,property:h,message:u,params:a,stack:y,schemaPath:l,title:m}}).reduce((r,i)=>{const{message:s,schemaPath:o}=i,a=o?.indexOf(`/${J}/`),l=o?.indexOf(`/${q}/`);let d;return a&&a>=0?d=o?.substring(0,a):l&&l>=0&&(d=o?.substring(0,l)),d&&r.find(u=>{var h;return u.message===s&&((h=u.schemaPath)===null||h===void 0?void 0:h.startsWith(d))})||r.push(i),r},[])}function C1(t,e,n,r,i,s,o){const{validationError:a}=e;let l=A1(e.errors,o);a&&(l=[...l,{stack:a.message}]),typeof s=="function"&&(l=s(l,o));let d=t0(l);if(a&&(d={...d,$schema:{__errors:[a.message]}}),typeof i!="function")return{errors:l,errorSchema:d};const f=Ol(t,r,n,r,!0),u=i(f,Xr(f),o,d),h=Wl(u);return Jn({errors:l,errorSchema:d},h)}class _1{constructor(e,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l}=e;this.ajv=O1(r,i,s,o,a,l),this.localizer=n}reset(){this.ajv.removeSchema()}rawValidation(e,n){var r,i;let s,o;try{e[oe]&&(o=this.ajv.getSchema(e[oe])),o===void 0&&(o=this.ajv.compile(e)),o(n)}catch(l){s=l}let a;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(l=>{var d;["missingProperty","property"].forEach(f=>{var u;!((u=l.params)===null||u===void 0)&&u[f]&&(l.params[f]=`'${l.params[f]}'`)}),!((d=l.params)===null||d===void 0)&&d.deps&&(l.params.deps=l.params.deps.split(", ").map(f=>`'${f}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(l=>{var d;["missingProperty","property"].forEach(f=>{var u;!((u=l.params)===null||u===void 0)&&u[f]&&(l.params[f]=l.params[f].slice(1,-1))}),!((d=l.params)===null||d===void 0)&&d.deps&&(l.params.deps=l.params.deps.split(", ").map(f=>f.slice(1,-1)).join(", "))})),a=o.errors||void 0,o.errors=null),{errors:a,validationError:s}}validateFormData(e,n,r,i,s){const o=this.rawValidation(n,e);return C1(this,o,e,n,r,i,s)}handleSchemaUpdate(e){var n,r;const i=(n=e[oe])!==null&&n!==void 0?n:ya;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(e,i):le(e,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(e,i))}isValid(e,n,r){var i;try{this.handleSchemaUpdate(r);const s=Qi(e),o=(i=s[oe])!==null&&i!==void 0?i:Xx(s);let a;return a=this.ajv.getSchema(o),a===void 0&&(a=this.ajv.addSchema(s,o).getSchema(o)||this.ajv.compile(s)),a(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function N1(t={},e){return new _1(t,e)}const T1=N1();function G(...t){return Bc(Uc(t))}const P1=hi("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function os({className:t,variant:e,size:n,asChild:r=!1,...i}){const s=r?Yo:"button";return c.jsx(s,{"data-slot":"button",className:G(P1({variant:e,size:n,className:t})),...i})}function F1({uiSchema:t,registry:e,className:n,...r}){const{translateString:i}=e;return c.jsx("div",{className:"p-0 m-0",children:c.jsxs(os,{...r,className:G("w-fit gap-2",n),variant:"outline",type:"button",children:[c.jsx(fa,{size:16})," ",i(K.AddItemButton)]})})}function E1(t){const{children:e,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:s,uiSchema:o,registry:a}=t,l=U(o),d=L("ArrayFieldItemButtonsTemplate",a,l),f=i?-6:22;return c.jsx("div",{children:c.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[c.jsx("div",{className:"grow shrink",children:e}),c.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&c.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${f}px`:void 0},children:c.jsx(d,{...n})})})]})})}function I1(t){const{canAdd:e,disabled:n,fieldPathId:r,uiSchema:i,items:s,optionalDataControl:o,onAddClick:a,readonly:l,registry:d,required:f,schema:u,title:h}=t,y=U(i),m=L("ArrayFieldDescriptionTemplate",d,y),p=L("ArrayFieldTitleTemplate",d,y),g=!l&&!n,{ButtonTemplates:{AddButton:x}}=d.templates;return c.jsx("div",{children:c.jsx("div",{className:"m-0 flex p-0",children:c.jsxs("div",{className:"m-0 w-full p-0",children:[c.jsx(p,{fieldPathId:r,title:y.title||h,schema:u,uiSchema:i,required:f,registry:d,optionalDataControl:g?o:void 0}),c.jsx(m,{fieldPathId:r,description:y.description||u.description,schema:u,uiSchema:i,registry:d}),c.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[g?void 0:o,s,e&&c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(x,{id:qe(r,"add"),className:"rjsf-array-item-add",onClick:a,disabled:n||l,uiSchema:i,registry:d})})]},`array-item-list-${r.$id}`)]})})})}function ac({className:t,type:e,...n}){return c.jsx("input",{type:e,"data-slot":"input",className:G("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}function D1({id:t,htmlName:e,placeholder:n,required:r,readonly:i,disabled:s,type:o,value:a,onChange:l,onChangeOverride:d,onBlur:f,onFocus:u,autofocus:h,options:y,schema:m,rawErrors:p=[],children:g,extraProps:x,className:S,registry:O}){const{ClearButton:b}=O.templates.ButtonTemplates,v={...x,...Ml(m,o,y)},w=({target:{value:T}})=>l(T===""?y.emptyValue:T),j=({target:T})=>f(t,T&&T.value),A=({target:T})=>u(t,T&&T.value),C=F.useCallback(T=>{var N;T.preventDefault(),T.stopPropagation(),l((N=y.emptyValue)!==null&&N!==void 0?N:"")},[l,y.emptyValue]);return c.jsxs("div",{className:"p-0.5",children:[c.jsx(ac,{id:t,name:e||t,type:o,placeholder:n,autoFocus:h,required:r,disabled:s,readOnly:i,className:G({"border-destructive focus-visible:ring-0":p.length>0},S),list:m.examples?_n(t):void 0,...v,value:a||a===0?a:"",onChange:d||w,onBlur:j,onFocus:A,"aria-describedby":we(t,!!m.examples)}),y.allowClearTextInputs&&!i&&!s&&a&&c.jsx(b,{onClick:C,registry:O}),g,Array.isArray(m.examples)?c.jsx("datalist",{id:_n(t),children:m.examples.concat(m.default&&!m.examples.includes(m.default)?[m.default]:[]).map(T=>c.jsx("option",{value:T},T))}):null]})}function $1({id:t,description:e,registry:n,uiSchema:r}){return e?c.jsx("div",{children:c.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:c.jsx(is,{description:e,registry:n,uiSchema:r})})}):null}const k1=hi("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function M1({className:t,variant:e,...n}){return c.jsx("div",{"data-slot":"alert",role:"alert",className:G(k1({variant:e}),t),...n})}function R1({className:t,...e}){return c.jsx("div",{"data-slot":"alert-title",className:G("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function B1({className:t,...e}){return c.jsx("div",{"data-slot":"alert-description",className:G("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function U1({errors:t,registry:e}){const{translateString:n}=e;return c.jsxs(M1,{variant:"destructive",className:"mb-2",children:[c.jsx(Zu,{className:"h-4 w-4"}),c.jsx(R1,{children:n(K.ErrorsLabel)}),c.jsx(B1,{className:"flex flex-col gap-1",children:t.map((r,i)=>c.jsxs("span",{children:["• ",r.stack]},i))})]})}function L1(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=Yi(n);return c.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((i,s)=>c.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},s))})}function V1(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i,hasErrors:s}=t;return n?c.jsx("span",{className:G("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:Xi(e),children:c.jsx(ss,{help:n,registry:i,uiSchema:r})}):null}function W1({id:t,children:e,displayLabel:n,rawErrors:r=[],errors:i,help:s,description:o,rawDescription:a,classNames:l,style:d,disabled:f,label:u,hidden:h,onKeyRename:y,onKeyRenameBlur:m,onRemoveProperty:p,readonly:g,required:x,schema:S,uiSchema:O,registry:b}){const v=U(O),w=L("WrapIfAdditionalTemplate",b,v);if(h)return c.jsx("div",{className:"hidden",children:e});const j=v.widget==="checkbox";return c.jsx(w,{classNames:l,style:d,disabled:f,id:t,label:u,displayLabel:n,onKeyRename:y,onKeyRenameBlur:m,onRemoveProperty:p,rawDescription:a,readonly:g,required:x,schema:S,uiSchema:O,registry:b,children:c.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!j&&c.jsxs("label",{className:G("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[u,x?"*":null]}),e,n&&a&&!j&&c.jsx("span",{className:G("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:o}),i,s]})})}function z1(t){const{children:e,column:n,className:r,...i}=t;return c.jsx("div",{className:G("grid gap-2",r),...i,children:e})}function en(t){const{icon:e,iconType:n,className:r,uiSchema:i,registry:s,...o}=t;return c.jsx(os,{size:"icon",variant:"outline",className:r,...o,type:"button",children:e})}function q1(t){const{registry:{translateString:e}}=t;return c.jsx(en,{title:e(K.CopyButton),...t,icon:c.jsx(rd,{className:"h-4 w-4"})})}function K1(t){const{registry:{translateString:e}}=t;return c.jsx(en,{title:e(K.MoveDownButton),...t,icon:c.jsx(da,{className:"h-4 w-4"})})}function G1(t){const{registry:{translateString:e}}=t;return c.jsx(en,{title:e(K.MoveUpButton),...t,icon:c.jsx(Xu,{className:"h-4 w-4"})})}function lc(t){const{registry:{translateString:e}}=t;return c.jsx(en,{title:e(K.RemoveButton),...t,className:"border-destructive",icon:c.jsx(ad,{className:"h-4 w-4 stroke-destructive"})})}function H1(t){const{registry:{translateString:e}}=t;return c.jsx(en,{title:e(K.ClearButton),...t,icon:c.jsx(ma,{})})}function Y1({selector:t,optionSchemaField:e}){return c.jsxs("div",{className:G("p-4 border rounded-md bg-background shadow-sm"),children:[c.jsx("div",{className:G("mb-4"),children:t}),e]})}function X1({description:t,title:e,properties:n,required:r,uiSchema:i,fieldPathId:s,schema:o,formData:a,optionalDataControl:l,onAddProperty:d,disabled:f,readonly:u,registry:h}){const y=U(i),m=L("TitleFieldTemplate",h,y),p=L("DescriptionFieldTemplate",h,y),g=!u&&!f,{ButtonTemplates:{AddButton:x}}=h.templates;return c.jsxs(c.Fragment,{children:[e&&c.jsx(m,{id:gr(s),title:e,required:r,schema:o,uiSchema:i,registry:h,optionalDataControl:g?l:void 0}),t&&c.jsx(p,{id:It(s),description:t,schema:o,uiSchema:i,registry:h}),c.jsxs("div",{className:"flex flex-col gap-2",children:[g?void 0:l,n.map((S,O)=>c.jsx("div",{className:`${S.hidden?"hidden":""} flex`,children:c.jsx("div",{className:"w-full",children:S.content})},O)),xa(o,i,a)?c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(x,{id:qe(s,"add"),onClick:d,disabled:f||u,className:"rjsf-object-property-expand",uiSchema:i,registry:h})}):null]})]})}function J1(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?c.jsx(en,{id:e,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:c.jsx(fa,{}),size:"xs"}):s?c.jsx(lc,{id:e,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):c.jsx("em",{id:e,children:r})}function Z1(t){const{submitText:e,norender:n,props:r}=Rl(t.uiSchema);return n?null:c.jsx("div",{children:c.jsx(os,{type:"submit",...r,className:G("my-2",r?.className),children:e})})}function cc({className:t,orientation:e="horizontal",decorative:n=!0,...r}){return c.jsx(Lc,{"data-slot":"separator",decorative:n,orientation:e,className:G("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Q1({id:t,title:e,uiSchema:n,optionalDataControl:r}){const i=U(n);let s=c.jsx("h5",{children:i.title||e});return r&&(s=c.jsxs("div",{className:"flex flex-row",children:[c.jsx("div",{className:"flex-grow",children:s}),c.jsx("div",{className:"flex",children:r})]})),c.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[s,c.jsx(cc,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function eS({classNames:t,style:e,children:n,disabled:r,id:i,label:s,displayLabel:o,onRemoveProperty:a,onKeyRenameBlur:l,rawDescription:d,readonly:f,required:u,schema:h,uiSchema:y,registry:m}){const{templates:p,translateString:g}=m,{RemoveButton:x}=p.ButtonTemplates,S=g(K.KeyLabel,[s]);if(!(et in h))return c.jsx("div",{className:t,style:e,children:n});const v=o?22+(d?-28:0):0,w=`${i}-key`;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[c.jsx("div",{className:"grid gap-2 col-span-5",children:c.jsxs("div",{className:"flex flex-col gap-2",children:[o&&c.jsx("label",{htmlFor:w,className:"text-sm font-medium text-muted-foreground leading-none",children:S}),c.jsx("div",{className:"pl-0.5",children:c.jsx(ac,{required:u,defaultValue:s,disabled:r||f,id:w,name:w,onBlur:f?void 0:l,type:"text",className:"w-full border shadow-sm"})}),!!d&&c.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),c.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),c.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${v}px`},children:c.jsx(x,{id:qe(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||f,onClick:a,uiSchema:y,registry:m})})]}),c.jsx(cc,{dir:"horizontal",className:"mt-2"})]})}function tS(){return{ArrayFieldItemTemplate:E1,ArrayFieldTemplate:I1,BaseInputTemplate:D1,ButtonTemplates:{AddButton:F1,CopyButton:q1,MoveDownButton:K1,MoveUpButton:G1,RemoveButton:lc,SubmitButton:Z1,ClearButton:H1},DescriptionFieldTemplate:$1,ErrorListTemplate:U1,FieldErrorTemplate:L1,FieldHelpTemplate:V1,FieldTemplate:W1,GridTemplate:z1,MultiSchemaFieldTemplate:Y1,ObjectFieldTemplate:X1,OptionalDataControlsTemplate:J1,TitleFieldTemplate:Q1,WrapIfAdditionalTemplate:eS}}function nS(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var rS=["color"],iS=F.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=nS(t,rS);return F.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),F.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function uc({className:t,...e}){return c.jsx(Vc,{"data-slot":"checkbox",className:G("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:c.jsx(Wc,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:c.jsx(iS,{className:"size-3.5"})})})}function as({className:t,...e}){return c.jsx(zc,{"data-slot":"label",className:G("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function sS(t){const{id:e,htmlName:n,value:r,disabled:i,readonly:s,label:o,hideLabel:a,schema:l,autofocus:d,options:f,onChange:u,onBlur:h,onFocus:y,registry:m,uiSchema:p,className:g}=t,x=hn(l),S=L("DescriptionFieldTemplate",m,f),O=j=>u(j),b=()=>h(e,r),v=()=>y(e,r),w=f.description||l.description;return c.jsxs("div",{className:`relative ${i||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":we(e),children:[!a&&w&&c.jsx(S,{id:It(e),description:w,schema:l,uiSchema:p,registry:m}),c.jsxs("div",{className:"flex items-center gap-2 my-2",children:[c.jsx(uc,{id:e,name:n||e,checked:typeof r>"u"?!1:!!r,required:x,disabled:i||s,autoFocus:d,onCheckedChange:O,onBlur:b,onFocus:v,className:g}),c.jsx(as,{className:"leading-tight",htmlFor:e,children:Ul(o,a||!o)})]})]})}function oS({id:t,htmlName:e,disabled:n,options:r,value:i,autofocus:s,readonly:o,required:a,onChange:l,onBlur:d,onFocus:f,className:u}){const{enumOptions:h,enumDisabled:y,inline:m,emptyValue:p}=r,g=Array.isArray(i)?i:[i],x=({target:O})=>d(t,ge(O&&O.value,h,p)),S=({target:O})=>f(t,ge(O&&O.value,h,p));return c.jsx("div",{className:G({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(h)&&h.map((O,b)=>{const v=Mn(O.value,g),w=Array.isArray(y)&&y.indexOf(O.value)!==-1,j=jt(t,b);return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(uc,{id:j,name:e||t,required:a,disabled:n||w||o,onCheckedChange:A=>{l(A?Dl(b,g,h):El(b,g,h))},className:u,checked:v,autoFocus:s&&b===0,onBlur:x,onFocus:S,"aria-describedby":we(t)}),c.jsx(as,{className:"leading-tight",htmlFor:jt(t,b),children:O.label})]},j)})})}function aS({className:t,...e}){return c.jsx($u,{"data-slot":"radio-group",className:G("grid gap-3",t),...e})}function lS({className:t,...e}){return c.jsx(ku,{"data-slot":"radio-group-item",className:G("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:c.jsx(Mu,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:c.jsx(td,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function cS({id:t,options:e,value:n,required:r,disabled:i,readonly:s,onChange:o,onBlur:a,onFocus:l,className:d}){const{enumOptions:f,enumDisabled:u,emptyValue:h}=e,y=x=>o(ge(x,f,h)),m=({target:x})=>a(t,ge(x&&x.value,f,h)),p=({target:x})=>l(t,ge(x&&x.value,f,h)),g=!!(e&&e.inline);return c.jsx("div",{className:"mb-0",children:c.jsx(aS,{defaultValue:n?.toString(),required:r,disabled:i||s,onValueChange:x=>{y(x)},onBlur:m,onFocus:p,"aria-describedby":we(t),orientation:g?"horizontal":"vertical",className:G("flex flex-wrap",{"flex-col":!g},d),children:Array.isArray(f)&&f.map((x,S)=>{const O=Array.isArray(u)&&u.indexOf(x.value)!==-1,b=Mn(x.value,n);return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(lS,{checked:b,value:S.toString(),id:jt(t,S),disabled:O}),c.jsx(as,{className:"leading-tight",htmlFor:jt(t,S),children:x.label})]},jt(t,S))})})})}var dc=["PageUp","PageDown"],fc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],mc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tn="Slider",[ui,uS,dS]=Kc(tn),[hc]=Yc(tn,[dS]),[fS,br]=hc(tn),pc=F.forwardRef((t,e)=>{const{name:n,min:r=0,max:i=100,step:s=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:d=[r],value:f,onValueChange:u=()=>{},onValueCommit:h=()=>{},inverted:y=!1,form:m,...p}=t,g=F.useRef(new Set),x=F.useRef(0),O=o==="horizontal"?mS:hS,[b=[],v]=qc({prop:f,defaultProp:d,onChange:N=>{[...g.current][x.current]?.focus(),u(N)}}),w=F.useRef(b);function j(N){const _=bS(b,N);T(N,_)}function A(N){T(N,x.current)}function C(){const N=w.current[x.current];b[x.current]!==N&&h(b)}function T(N,_,{commit:P}={commit:!1}){const $=jS(s),E=OS(Math.round((N-r)/s)*s+r,$),D=sa(E,[r,i]);v((M=[])=>{const k=yS(M,D,_);if(wS(k,l*s)){x.current=k.indexOf(D);const B=String(k)!==String(M);return B&&P&&h(k),B?k:M}else return M})}return c.jsx(fS,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:x,thumbs:g.current,values:b,orientation:o,form:m,children:c.jsx(ui.Provider,{scope:t.__scopeSlider,children:c.jsx(ui.Slot,{scope:t.__scopeSlider,children:c.jsx(O,{"aria-disabled":a,"data-disabled":a?"":void 0,...p,ref:e,onPointerDown:Bt(p.onPointerDown,()=>{a||(w.current=b)}),min:r,max:i,inverted:y,onSlideStart:a?void 0:j,onSlideMove:a?void 0:A,onSlideEnd:a?void 0:C,onHomeKeyDown:()=>!a&&T(r,0,{commit:!0}),onEndKeyDown:()=>!a&&T(i,b.length-1,{commit:!0}),onStepKeyDown:({event:N,direction:_})=>{if(!a){const E=dc.includes(N.key)||N.shiftKey&&fc.includes(N.key)?10:1,D=x.current,M=b[D],k=s*E*_;T(M+k,D,{commit:!0})}}})})})})});pc.displayName=tn;var[gc,yc]=hc(tn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),mS=F.forwardRef((t,e)=>{const{min:n,max:r,dir:i,inverted:s,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:d,...f}=t,[u,h]=F.useState(null),y=Yt(e,O=>h(O)),m=F.useRef(void 0),p=Gc(i),g=p==="ltr",x=g&&!s||!g&&s;function S(O){const b=m.current||u.getBoundingClientRect(),v=[0,b.width],j=ls(v,x?[n,r]:[r,n]);return m.current=b,j(O-b.left)}return c.jsx(gc,{scope:t.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:c.jsx(xc,{dir:p,"data-orientation":"horizontal",...f,ref:y,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:O=>{const b=S(O.clientX);o?.(b)},onSlideMove:O=>{const b=S(O.clientX);a?.(b)},onSlideEnd:()=>{m.current=void 0,l?.()},onStepKeyDown:O=>{const v=mc[x?"from-left":"from-right"].includes(O.key);d?.({event:O,direction:v?-1:1})}})})}),hS=F.forwardRef((t,e)=>{const{min:n,max:r,inverted:i,onSlideStart:s,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...d}=t,f=F.useRef(null),u=Yt(e,f),h=F.useRef(void 0),y=!i;function m(p){const g=h.current||f.current.getBoundingClientRect(),x=[0,g.height],O=ls(x,y?[r,n]:[n,r]);return h.current=g,O(p-g.top)}return c.jsx(gc,{scope:t.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:c.jsx(xc,{"data-orientation":"vertical",...d,ref:u,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const g=m(p.clientY);s?.(g)},onSlideMove:p=>{const g=m(p.clientY);o?.(g)},onSlideEnd:()=>{h.current=void 0,a?.()},onStepKeyDown:p=>{const x=mc[y?"from-bottom":"from-top"].includes(p.key);l?.({event:p,direction:x?-1:1})}})})}),xc=F.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...d}=t,f=br(tn,n);return c.jsx(Tn.span,{...d,ref:e,onKeyDown:Bt(t.onKeyDown,u=>{u.key==="Home"?(o(u),u.preventDefault()):u.key==="End"?(a(u),u.preventDefault()):dc.concat(fc).includes(u.key)&&(l(u),u.preventDefault())}),onPointerDown:Bt(t.onPointerDown,u=>{const h=u.target;h.setPointerCapture(u.pointerId),u.preventDefault(),f.thumbs.has(h)?h.focus():r(u)}),onPointerMove:Bt(t.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&i(u)}),onPointerUp:Bt(t.onPointerUp,u=>{const h=u.target;h.hasPointerCapture(u.pointerId)&&(h.releasePointerCapture(u.pointerId),s(u))})})}),bc="SliderTrack",vc=F.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=br(bc,n);return c.jsx(Tn.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:e})});vc.displayName=bc;var di="SliderRange",Sc=F.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=br(di,n),s=yc(di,n),o=F.useRef(null),a=Yt(e,o),l=i.values.length,d=i.values.map(h=>Oc(h,i.min,i.max)),f=l>1?Math.min(...d):0,u=100-Math.max(...d);return c.jsx(Tn.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...t.style,[s.startEdge]:f+"%",[s.endEdge]:u+"%"}})});Sc.displayName=di;var fi="SliderThumb",wc=F.forwardRef((t,e)=>{const n=uS(t.__scopeSlider),[r,i]=F.useState(null),s=Yt(e,a=>i(a)),o=F.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return c.jsx(pS,{...t,ref:s,index:o})}),pS=F.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:i,...s}=t,o=br(fi,n),a=yc(fi,n),[l,d]=F.useState(null),f=Yt(e,S=>d(S)),u=l?o.form||!!l.closest("form"):!0,h=Hc(l),y=o.values[r],m=y===void 0?0:Oc(y,o.min,o.max),p=xS(r,o.values.length),g=h?.[a.size],x=g?vS(g,m,a.direction):0;return F.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${m}% + ${x}px)`},children:[c.jsx(ui.ItemSlot,{scope:t.__scopeSlider,children:c.jsx(Tn.span,{role:"slider","aria-label":t["aria-label"]||p,"aria-valuemin":o.min,"aria-valuenow":y,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...s,ref:f,style:y===void 0?{display:"none"}:t.style,onFocus:Bt(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),u&&c.jsx(jc,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:y},r)]})});wc.displayName=fi;var gS="RadioBubbleInput",jc=F.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const i=F.useRef(null),s=Yt(i,r),o=Xc(e);return F.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&f){const u=new Event("input",{bubbles:!0});f.call(a,e),a.dispatchEvent(u)}},[o,e]),c.jsx(Tn.input,{style:{display:"none"},...n,ref:s,defaultValue:e})});jc.displayName=gS;function yS(t=[],e,n){const r=[...t];return r[n]=e,r.sort((i,s)=>i-s)}function Oc(t,e,n){const s=100/(n-e)*(t-e);return sa(s,[0,100])}function xS(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function bS(t,e){if(t.length===1)return 0;const n=t.map(i=>Math.abs(i-e)),r=Math.min(...n);return n.indexOf(r)}function vS(t,e,n){const r=t/2,s=ls([0,50],[0,r]);return(r-s(e)*n)*n}function SS(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function wS(t,e){if(e>0){const n=SS(t);return Math.min(...n)>=e}return!0}function ls(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function jS(t){return(String(t).split(".")[1]||"").length}function OS(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var AS=pc,CS=vc,_S=Sc,NS=wc;function TS({className:t,defaultValue:e,value:n,min:r=0,max:i=100,...s}){const o=F.useMemo(()=>Array.isArray(n)?n:Array.isArray(e)?e:[r,i],[n,e,r,i]);return c.jsxs(AS,{"data-slot":"slider",defaultValue:e,value:n,min:r,max:i,className:G("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...s,children:[c.jsx(CS,{"data-slot":"slider-track",className:G("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:c.jsx(_S,{"data-slot":"slider-range",className:G("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(a,l)=>c.jsx(NS,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}const PS=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function FS({value:t,readonly:e,disabled:n,options:r,schema:i,onChange:s,label:o,id:a}){const l=u=>s(u[0]),d={...kl(i)},f={id:a,...Ki(r.props||{},PS)};return c.jsxs(c.Fragment,{children:[c.jsx(TS,{disabled:n||e,min:d.min,max:d.max,step:d.step,value:[t],onValueChange:l,...f,"aria-describedby":we(a)}),t]})}const ES=hi("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function IS({className:t,variant:e,asChild:n=!1,...r}){const i=n?Yo:"span";return c.jsx(i,{"data-slot":"badge",className:G(ES({variant:e}),t),...r})}const Ac=F.forwardRef(({className:t,...e},n)=>c.jsx(_t,{ref:n,"data-slot":"command",className:G("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),DS=F.forwardRef(({className:t,...e},n)=>c.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[c.jsx(sd,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),c.jsx(_t.Input,{ref:n,className:G("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));DS.displayName=_t.Input.displayName;function Cc({className:t,...e}){return c.jsx(_t.List,{"data-slot":"command-list",className:G("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function _c({className:t,...e}){return c.jsx(_t.Group,{"data-slot":"command-group",className:G("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function Nc({className:t,...e}){return c.jsx(_t.Item,{"data-slot":"command-item",className:G("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function $S({multiple:t,items:e=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:s=!1,ariaDescribedby:o,ariaPlaceholder:a,onFocus:l,onBlur:d,className:f,id:u}){const h=F.useRef(null),[y,m]=F.useState(!1),[p,g]=F.useState(""),x=F.useMemo(()=>e.filter(j=>n.some(A=>ft(j.value,A))),[e,n]),S=F.useMemo(()=>e.filter(j=>!x.some(A=>ft(A.value,j.value))),[e,x]),O=F.useCallback(j=>{if(s)return;const A=x.filter(C=>!ft(C.value,j.value));r?.(A.map(C=>C.index))},[x,r,s]),b=F.useCallback(j=>{if(!(s||!h.current||h.current.value!==""))if(j.key==="Delete"||j.key==="Backspace"){const A=x.slice(0,-1);r?.(A.map(C=>C.index))}else j.key==="Escape"&&h.current.blur()},[x,r,s]),v=F.useCallback(j=>{if(s)return;g("");const A=t?[...x,j]:[j];r?.(A.map(C=>C.index))},[t,x,r,s]),w=F.useCallback(j=>{s||m(!0),l?.(j)},[s,l]);return c.jsxs(Ac,{onKeyDown:b,className:G("overflow-visible bg-transparent",f),autoFocus:i,"aria-disabled":s,onBlur:d,onFocus:w,"aria-describedby":o,"aria-placeholder":a,children:[c.jsx("div",{className:G("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",s&&"opacity-50 cursor-not-allowed"),children:c.jsxs("div",{className:"flex gap-1 flex-wrap",children:[x.map(j=>c.jsxs(IS,{variant:"secondary",children:[j.label,c.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:A=>A.key==="Enter"&&!s&&O(j),onMouseDown:A=>{A.preventDefault(),A.stopPropagation()},onClick:()=>O(j),disabled:s,children:c.jsx(ma,{className:G("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},j.value)),c.jsx(_t.Input,{ref:h,value:p,onValueChange:g,onBlur:()=>m(!1),onFocus:()=>!s&&m(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${u}`,"aria-labelledby":`command-item-input-${u}`,id:`command-item-input-${u}`})]})}),y&&!s&&S.length>0&&c.jsx("div",{className:"relative mt-2",children:c.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:c.jsx(_c,{className:"h-full overflow-auto",children:c.jsx(Cc,{children:S.map(j=>c.jsx(Nc,{disabled:j.disabled,onMouseDown:A=>{A.preventDefault(),A.stopPropagation()},"aria-controls":`${j.value}-command-item`,"aria-labelledby":`${j.value}-command-item`,id:`${j.value}-command-item`,onSelect:()=>v(j),className:"cursor-pointer",children:j.label},`${j.value}-command-item`))})})})})]})}function kS({items:t,selected:e,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:s=!1,placeholder:o="Select...",ariaDescribedby:a,ariaPlaceholder:l,onFocus:d,onBlur:f,className:u}){const[h,y]=F.useState(!1),m=t?.find(S=>S.value===e),p=F.useRef(null),g=F.useRef(null);F.useEffect(()=>{h&&p.current&&requestAnimationFrame(()=>{var S;(S=p.current)===null||S===void 0||S.scrollIntoView({block:"nearest"})})},[h]);const x=S=>{g.current&&!g.current.contains(S.relatedTarget)&&y(!1),f?.(S)};return c.jsxs(Ac,{ref:g,className:G("overflow-visible bg-transparent",u),autoFocus:r,"aria-disabled":i,onBlur:x,onFocus:d,"aria-describedby":a,"aria-placeholder":l,children:[c.jsxs("div",{onClick:()=>!i&&y(!h),className:G("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!m&&s&&"border-red-500",i&&"opacity-50 cursor-not-allowed",u),children:[c.jsx("span",{className:G("flex-1 line-clamp-1",!m&&"text-muted-foreground"),children:m?.label||o}),c.jsx(da,{className:"h-4 w-4 opacity-50"})]}),c.jsx("div",{className:"relative",children:h&&t&&t.length>0?c.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:c.jsx(_c,{className:"h-full overflow-auto",children:c.jsx(Cc,{children:t.map(S=>c.jsxs(Nc,{ref:S.value===e?p:void 0,onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},onSelect:()=>{S.disabled||(n?.(S.value),y(!1))},className:G("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",S.value===e&&"font-semibold",S.disabled&&"opacity-50 cursor-not-allowed"),children:[c.jsx("span",{children:S.label}),c.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:S.value===e&&c.jsx(Gu,{className:"h-4 w-4"})})]},S.value))})})}):null})]})}function MS({id:t,options:e,required:n,disabled:r,readonly:i,value:s,multiple:o,autofocus:a,onChange:l,onBlur:d,onFocus:f,defaultValue:u,placeholder:h,rawErrors:y=[],className:m}){const{enumOptions:p,enumDisabled:g,emptyValue:x}=e,S=()=>{f(t,ge(s,p,x))},O=()=>{d(t,ge(s,p,x))},b=p?.map(({value:w,label:j},A)=>({value:o?w:A.toString(),label:j,index:A,disabled:Array.isArray(g)&&g.includes(w)})),v=G({"border-destructive":y.length>0},m);return c.jsx("div",{className:"p-0.5",children:o?c.jsx($S,{id:t,autoFocus:a,disabled:r||i,multiple:!0,className:v,items:b,selected:s,onValueChange:w=>{l(ge(w,p,x))},onFocus:S,onBlur:O}):c.jsx(kS,{items:b,selected:Il(s??u,p,!1),onValueChange:w=>{l(ge(w,p,x))},autoFocus:a,disabled:r||i,required:n,placeholder:h,className:v,onFocus:S,onBlur:O,ariaDescribedby:we(t)})})}function RS({className:t,...e}){return c.jsx("textarea",{"data-slot":"textarea",className:G("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function BS({id:t,htmlName:e,placeholder:n,value:r,required:i,disabled:s,autofocus:o,readonly:a,onBlur:l,onFocus:d,onChange:f,options:u,className:h}){const y=({target:{value:g}})=>f(g===""?u.emptyValue:g),m=({target:g})=>l(t,g&&g.value),p=({target:g})=>d(t,g&&g.value);return c.jsx("div",{className:"flex p-0.5",children:c.jsx(RS,{id:t,name:e||t,placeholder:n,disabled:s,readOnly:a,value:r??"",required:i,autoFocus:o,rows:u.rows||5,onChange:y,onBlur:m,onFocus:p,"aria-describedby":we(t),className:h})})}function US(){return{CheckboxWidget:sS,CheckboxesWidget:oS,RadioWidget:cS,RangeWidget:FS,SelectWidget:MS,TextareaWidget:BS}}function LS(){return{templates:tS(),widgets:US()}}function VS(){return g1(LS())}const WS=VS();function zS(t){const e=t.properties;if(!e)return!1;const n=e.__type,r=e.__binding;return!!(n?.const||r?.const)}function qS(t){const e=t.properties;if(!e)return{};const n=e.__type,r=e.__binding;return{bindingType:n?.const,bindingSchema:r?.const}}function KS(t){return t.replace(/^root_/,"").split("_")[0]||""}function Ko(t){return typeof t!="string"?!1:(t.startsWith("@")?t.slice(1):t).includes("/")}function GS(t){const e=ve.c(8),{bindingSchema:n,bindingType:r,currentValue:i,onValueChange:s,placeholder:o,onAddNew:a,className:l}=t,d=Ko(n),f=Ko(r),u=d||f,h=d?n:f?r:void 0,{bindingSchema:y}=uf(h);let m;e:{if(u){m=y;break e}if(Array.isArray(n)){m=n;break e}if(typeof n=="string"){m=n;break e}m=void 0}const p=m;let g;return e[0]!==r||e[1]!==l||e[2]!==i||e[3]!==a||e[4]!==s||e[5]!==o||e[6]!==p?(g=c.jsx(HS,{value:i,onValueChange:s,placeholder:o,binding:p,bindingType:r,onAddNew:a,className:l}),e[0]=r,e[1]=l,e[2]=i,e[3]=a,e[4]=s,e[5]=o,e[6]=p,e[7]=g):g=e[7],g}function HS({value:t,onValueChange:e,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:s,className:o}){const[a,l]=F.useState(!1),{installByBinding:d,isInstalling:f}=ff(),u=a||f,h=pi(),y=Qo({connections:h,binding:r}),m=(()=>{if(!i?.startsWith("@"))return null;const[S,O]=i.replace("@","").split("/");return S&&O?{scope:S,appName:O}:null})(),p=(()=>{let S=y;const O=Array.isArray(r)&&r.length>0;if(m&&!O&&(S=S.filter(b=>{const v=b.app_name,w=b.metadata?.scopeName;return v===m.appName&&w===m.scope})),t&&!S.some(b=>b.id===t)){const b=h?.find(v=>v.id===t);if(b)return[b,...S]}return S})(),g=i?.startsWith("@"),x=async()=>{if(g&&i){l(!0);try{const S=await d(i);S&&e(S.id)}catch(S){const O=S instanceof Error?S.message:String(S);Qe.error(`Failed to connect MCP: ${O}`)}finally{l(!1)}return}s?.()};return c.jsxs(ta,{value:t,onValueChange:e,children:[c.jsx(na,{size:"sm",className:yu("w-[200px]",o),children:c.jsx(ra,{placeholder:n})}),c.jsxs(ia,{children:[p.length===0?c.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No connections found"}):p.map(S=>c.jsx(Mt,{value:S.id,children:c.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?c.jsx("img",{src:S.icon,alt:S.title,className:"w-4 h-4 rounded"}):c.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.title.slice(0,1).toUpperCase()}),c.jsx("span",{children:S.title})]})},S.id)),(s||g)&&c.jsx("div",{className:"border-t border-border",children:c.jsx(Wt,{onClick:S=>{S.preventDefault(),S.stopPropagation(),x()},disabled:u,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:u?c.jsxs(c.Fragment,{children:[c.jsx(yn,{size:16,className:"animate-spin"}),c.jsx("span",{children:"Connecting..."})]}):c.jsxs(c.Fragment,{children:[c.jsx(la,{size:16}),c.jsx("span",{children:"Custom Connection"})]})})})]})]})}function YS(t){const e=ve.c(68),{schema:n,formData:r,title:i,description:s,registry:o}=t,a=o.formContext,l=t.properties[0]?.content?.key;let d;e[0]!==l||e[1]!==i?(d=i||(l?KS(l):""),e[0]=l,e[1]=i,e[2]=d):d=e[2];const f=d;if(zS(n)){const y=n;let m;e[3]!==y?(m=qS(y),e[3]=y,e[4]=m):m=e[4];const{bindingType:p,bindingSchema:g}=m,x=r?.value||"";let S;e[5]!==p||e[6]!==f||e[7]!==a||e[8]!==r?(S=M=>{const k={...r,value:M,...p&&{__type:p}};a?.onFieldChange(f,k)},e[5]=p,e[6]=f,e[7]=a,e[8]=r,e[9]=S):S=e[9];const O=S;let b;e[10]!==p||e[11]!==f||e[12]!==a?(b=M=>{a?.onFieldChange(f,{__type:p,value:{id:M.id,connectionId:M.connectionId}})},e[10]=p,e[11]=f,e[12]=a,e[13]=b):b=e[13];const v=b,w=JS;let j;e[14]!==f||e[15]!==i?(j=w(i||f),e[14]=f,e[15]=i,e[16]=j):j=e[16];const A=j;if(p==="@deco/agent"){let M;e[17]!==A?(M=c.jsx("label",{className:"text-sm font-medium truncate block",children:A}),e[17]=A,e[18]=M):M=e[18];let k;e[19]!==s?(k=s&&c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s}),e[19]=s,e[20]=k):k=e[20];let B;e[21]!==M||e[22]!==k?(B=c.jsxs("div",{className:"flex-1 min-w-0",children:[M,k]}),e[21]=M,e[22]=k,e[23]=B):B=e[23];const W=x||void 0;let R;e[24]!==O||e[25]!==W?(R=c.jsx(Ru,{selectedVirtualMcpId:W,onVirtualMcpChange:O,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[24]=O,e[25]=W,e[26]=R):R=e[26];let V;return e[27]!==R||e[28]!==B?(V=c.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[B,R]}),e[27]=R,e[28]=B,e[29]=V):V=e[29],V}if(p==="@deco/language-model"){let M;e[30]!==A?(M=c.jsx("label",{className:"text-sm font-medium truncate block",children:A}),e[30]=A,e[31]=M):M=e[31];let k;e[32]!==s?(k=s&&c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s}),e[32]=s,e[33]=k):k=e[33];let B;e[34]!==M||e[35]!==k?(B=c.jsxs("div",{className:"flex-1 min-w-0",children:[M,k]}),e[34]=M,e[35]=k,e[36]=B):B=e[36];const W=x;let R;e[37]!==v||e[38]!==W?(R=c.jsx(Bu,{selectedModel:W,onModelChange:v,variant:"bordered",placeholder:"Select Language Model",className:"w-[200px] shrink-0"}),e[37]=v,e[38]=W,e[39]=R):R=e[39];let V;return e[40]!==R||e[41]!==B?(V=c.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[B,R]}),e[40]=R,e[41]=B,e[42]=V):V=e[42],V}let C;e[43]!==A?(C=c.jsx("label",{className:"text-sm font-medium truncate block",children:A}),e[43]=A,e[44]=C):C=e[44];let T;e[45]!==s?(T=s&&c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s}),e[45]=s,e[46]=T):T=e[46];let N;e[47]!==C||e[48]!==T?(N=c.jsxs("div",{className:"flex-1 min-w-0",children:[C,T]}),e[47]=C,e[48]=T,e[49]=N):N=e[49];let _;e[50]!==A?(_=A.toLowerCase(),e[50]=A,e[51]=_):_=e[51];const P=`Select ${_}...`;let $;e[52]!==a?($=()=>a?.onAddNew(),e[52]=a,e[53]=$):$=e[53];let E;e[54]!==g||e[55]!==p||e[56]!==x||e[57]!==O||e[58]!==P||e[59]!==$?(E=c.jsx(GS,{bindingSchema:g,bindingType:p,currentValue:x,onValueChange:O,placeholder:P,onAddNew:$,className:"w-[200px] shrink-0"}),e[54]=g,e[55]=p,e[56]=x,e[57]=O,e[58]=P,e[59]=$,e[60]=E):E=e[60];let D;return e[61]!==E||e[62]!==N?(D=c.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[N,E]}),e[61]=E,e[62]=N,e[63]=D):D=e[63],D}let u;e[64]!==t.properties?(u=t.properties.map(XS),e[64]=t.properties,e[65]=u):u=e[65];let h;return e[66]!==u?(h=c.jsx("div",{className:"flex flex-col gap-4",children:u}),e[66]=u,e[67]=h):h=e[67],h}function XS(t){return t.content}function JS(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,ZS)}function ZS(t){return t.toUpperCase()}function QS(t){const e=ve.c(13),{label:n,children:r,description:i,id:s,schema:o}=t;if(s.includes("__type")||s.includes("__binding"))return null;if(o.type==="object")return r;let a;e[0]!==s||e[1]!==n?(a=n&&c.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:s,children:n}),e[0]=s,e[1]=n,e[2]=a):a=e[2];let l;e[3]!==i?(l=i&&c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[3]=i,e[4]=l):l=e[4];let d;e[5]!==a||e[6]!==l?(d=c.jsxs("div",{className:"flex-1 min-w-0",children:[a,l]}),e[5]=a,e[6]=l,e[7]=d):d=e[7];let f;e[8]!==r?(f=c.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=f):f=e[9];let u;return e[10]!==d||e[11]!==f?(u=c.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[d,f]}),e[10]=d,e[11]=f,e[12]=u):u=e[12],u}const ew={ObjectFieldTemplate:YS,FieldTemplate:QS};function tw(t){const e=ve.c(18),{formState:n,onFormStateChange:r,stateSchema:i}=t,{org:s}=Nn(),o=Go();let a;e[0]!==r?(a=x=>{x.formData&&r(x.formData)},e[0]=r,e[1]=a):a=e[1];const l=a;let d;e[2]!==n||e[3]!==r?(d=(x,S)=>{const O={...n,[x]:S};r(O)},e[2]=n,e[3]=r,e[4]=d):d=e[4];const f=d;let u;e[5]!==o||e[6]!==s?(u=()=>{o({to:"/$org/mcps",params:{org:s.slug},search:{action:"create"}})},e[5]=o,e[6]=s,e[7]=u):u=e[7];const h=u;let y;e[8]!==n||e[9]!==h||e[10]!==f?(y={onFieldChange:f,formData:n,onAddNew:h},e[8]=n,e[9]=h,e[10]=f,e[11]=y):y=e[11];const m=y;let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=c.jsx(c.Fragment,{}),e[12]=p):p=e[12];let g;return e[13]!==m||e[14]!==n||e[15]!==l||e[16]!==i?(g=c.jsx("div",{className:"flex flex-col h-full overflow-auto p-5",children:c.jsx(WS,{schema:i,validator:T1,formData:n,onChange:l,formContext:m,liveValidate:!1,showErrorList:!1,templates:ew,children:p})}),e[13]=m,e[14]=n,e[15]=l,e[16]=i,e[17]=g):g=e[17],g}const nw=Xo({key:Ae().min(1,"Key is required"),value:Ae()}),rw=Xo({title:Ae().min(1,"Name is required"),description:Ae().nullable().optional(),ui_type:Qc(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:Ae().optional(),connection_token:Ae().nullable().optional(),npx_package:Ae().optional(),stdio_command:Ae().optional(),stdio_args:Ae().optional(),stdio_cwd:Ae().optional(),env_vars:us(nw).optional(),configuration_scopes:us(Ae()).nullable().optional(),configuration_state:Jc(Ae(),Zc()).nullable().optional()}).refine(t=>t.ui_type==="NPX"?!!t.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(t=>t.ui_type==="STDIO"?!!t.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(t=>t.ui_type==="HTTP"||t.ui_type==="SSE"||t.ui_type==="Websocket"?!!t.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function iw(t){return t.command==="npx"}function sw(t){return t.args?.find(e=>!e.startsWith("-"))??""}function ow(t){return{command:t.command,args:t.args?.join(" ")??"",cwd:t.cwd??""}}function aw(t,e){const n={command:"npx",args:["-y",t]},r=Jo(e);return Object.keys(r).length>0&&(n.envVars=r),n}function lw(t,e,n,r){const i={command:t};e.trim()&&(i.args=e.trim().split(/\s+/)),n?.trim()&&(i.cwd=n.trim());const s=Jo(r);return Object.keys(s).length>0&&(i.envVars=s),i}function cw(t,e){const n={title:t.title,description:t.description??"",configuration_state:t.configuration_state??{},configuration_scopes:e||t.configuration_scopes||[]};if(t.connection_type==="STDIO"&&iu(t.connection_headers)){const r=t.connection_headers,i=cu(r.envVars);if(iw(r)){const o=sw(r);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:o,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:i}}const s=ow(r);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:s.command,stdio_args:s.args,stdio_cwd:s.cwd,env_vars:i}}return{...n,ui_type:t.connection_type,connection_url:t.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function uw(t){let e,n=null,r=null,i=null;return t.ui_type==="NPX"?(e="STDIO",n="",i=aw(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(e="STDIO",n="",i=lw(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(e=t.ui_type,n=t.connection_url||"",r=t.connection_token||null),{title:t.title,description:t.description||null,connection_type:e,connection_url:n,...r&&{connection_token:r},...i&&{connection_headers:i},configuration_state:t.configuration_state??null,configuration_scopes:t.configuration_scopes??null}}function dw(t){const e=ve.c(13),{org:n}=Nn();let r;e[0]!==t||e[1]!==n.id?(r={connectionId:t,orgId:n.id},e[0]=t,e[1]=n.id,e[2]=r):r=e[2];const i=pu(r);let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={},e[3]=s):s=e[3];let o;e[4]!==i?(o={client:i,toolName:"MCP_CONFIGURATION",toolArguments:s,select:fw},e[4]=i,e[5]=o):o=e[5];const{data:a}=hu(o);let l;e[6]!==a.stateSchema?(l=a.stateSchema??{type:"object",properties:{}},e[6]=a.stateSchema,e[7]=l):l=e[7];const d=l;let f;e[8]!==a.scopes?(f=a.scopes??[],e[8]=a.scopes,e[9]=f):f=e[9];const u=f;let h;return e[10]!==u||e[11]!==d?(h={stateSchema:d,scopes:u},e[10]=u,e[11]=d,e[12]=h):h=e[12],h}function fw(t){return t.structuredContent??t}function mw(t){const e=ve.c(4),{onAuthenticate:n,buttonText:r}=t,i=r===void 0?"Authenticate":r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("h3",{className:"text-lg font-semibold",children:"Authentication Required"}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"This connection requires OAuth authentication to access resources."})]}),e[0]=s):s=e[0];let o;return e[1]!==i||e[2]!==n?(o=c.jsx("div",{className:"w-3/5 min-w-0 flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[s,c.jsx(Wt,{onClick:n,size:"lg",children:i})]})}),e[1]=i,e[2]=n,e[3]=o):o=e[3],o}function hw(t){const e=ve.c(7),{hasReadme:n,onViewReadme:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(bu,{size:48,className:"text-muted-foreground"}),e[0]=i):i=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("h3",{className:"text-lg font-semibold",children:"Manual Authentication Required"}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"This server requires an API key or token that must be configured manually. Check the server's documentation for instructions on obtaining credentials."})]}),e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==r?(o=n&&r&&c.jsxs(Wt,{onClick:r,variant:"outline",size:"lg",children:[c.jsx(xu,{size:18,className:"mr-2"}),"View README"]}),e[2]=n,e[3]=r,e[4]=o):o=e[4];let a;return e[5]!==o?(a=c.jsx("div",{className:"w-3/5 min-w-0 flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[i,s,o]})}),e[5]=o,e[6]=a):a=e[6],a}function pw(){const t=ve.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=c.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx("div",{className:"w-3/5 min-w-0 flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[e,c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("h3",{className:"text-lg font-semibold",children:"Server Error"}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"The MCP server is currently experiencing issues. Please try again later or check the server's status."})]})]})}),t[1]=n):n=t[1],n}function gw(t){const e=ve.c(3),n=dw(t.connection.id);let r;return e[0]!==n||e[1]!==t?(r=c.jsx(Tc,{...t,...n}),e[0]=n,e[1]=t,e[2]=r):r=e[2],r}function yw(t){const e=ve.c(2);let n;return e[0]!==t?(n=c.jsx(Tc,{...t}),e[0]=t,e[1]=n):n=e[1],n}function xw(t){const e=ve.c(13),{hasMcpBinding:n,stateSchema:r,formState:i,onFormStateChange:s,onAuthenticate:o,onViewReadme:a,isMCPAuthenticated:l,supportsOAuth:d,isServerError:f,hasReadme:u}=t,h=r&&r.properties&&typeof r.properties=="object"&&Object.keys(r.properties).length>0;if(!l){if(f){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=c.jsx(pw,{}),e[0]=g):g=e[0],g}if(d){let g;return e[1]!==o?(g=c.jsx(mw,{onAuthenticate:o}),e[1]=o,e[2]=g):g=e[2],g}let p;return e[3]!==u||e[4]!==a?(p=c.jsx(hw,{hasReadme:u,onViewReadme:a}),e[3]=u,e[4]=a,e[5]=p):p=e[5],p}if(!n)return null;if(!h||!r){let p;return e[6]===Symbol.for("react.memo_cache_sentinel")?(p=c.jsx("div",{className:"w-3/5 min-w-0 overflow-auto flex items-center justify-center",children:c.jsx(fu,{image:c.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[6]=p):p=e[6],p}let y;e[7]!==i?(y=i??{},e[7]=i,e[8]=y):y=e[8];let m;return e[9]!==s||e[10]!==r||e[11]!==y?(m=c.jsx("div",{className:"w-3/5 min-w-0 overflow-auto",children:c.jsx(tw,{stateSchema:r,formState:y,onFormStateChange:s})}),e[9]=s,e[10]=r,e[11]=y,e[12]=m):m=e[12],m}function Tc(t){const{connection:e,onUpdate:n,isUpdating:r,scopes:i,hasMcpBinding:s,stateSchema:o,onViewReadme:a}=t,l=ea(),d=eu(),u=tu().location.href,y=!!e?.metadata?.repository?.url,m=nu({resolver:ru(rw),values:cw(e,i)}),p=m.watch("configuration_state"),g=m.formState.isDirty,x=v=>{m.setValue("configuration_state",v,{shouldDirty:!0})},S=async()=>{if(!await m.trigger())return;const w=m.getValues(),j=uw(w);await n(j),m.reset(w)},O=async()=>{const{token:v,tokenInfo:w,error:j}=await ou({connectionId:e.id});if(j||!v){Qe.error(`Authentication failed: ${j}`);return}if(w)try{const C=await fetch(`/api/connections/${e.id}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:w.accessToken,refreshToken:w.refreshToken,expiresIn:w.expiresIn,scope:w.scope,clientId:w.clientId,clientSecret:w.clientSecret,tokenEndpoint:w.tokenEndpoint})});if(!C.ok)console.error("Failed to save OAuth token:",await C.text()),await l.update.mutateAsync({id:e.id,data:{connection_token:v}});else try{await l.update.mutateAsync({id:e.id,data:{}})}catch(T){console.warn("Failed to refresh connection tools after OAuth:",T)}}catch(C){console.error("Error saving OAuth token:",C),await l.update.mutateAsync({id:e.id,data:{connection_token:v}})}else await l.update.mutateAsync({id:e.id,data:{connection_token:v}});const A=new URL(`/mcp/${e.id}`,window.location.origin);await d.invalidateQueries({queryKey:Qn.isMCPAuthenticated(A.href,null)}),Qe.success("Authentication successful")},b=async()=>{try{const v=await fetch(`/api/connections/${e.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!v.ok){const j=await v.text();Qe.error(`Failed to remove OAuth: ${j}`);return}const w=new URL(`/mcp/${e.id}`,window.location.origin);await d.invalidateQueries({queryKey:Qn.isMCPAuthenticated(w.href,null)}),Qe.success("OAuth removed. You can now re-authenticate with a different account.")}catch(v){console.error("Error removing OAuth token:",v),Qe.error("Failed to remove OAuth")}};return c.jsxs(c.Fragment,{children:[c.jsxs(vu,{children:[c.jsx(gu,{title:`${e.title}: Settings`,url:u,icon:e.icon??"settings"}),g&&c.jsxs(Wt,{onClick:S,disabled:r,size:"sm",className:"h-7",children:[r&&c.jsx(yn,{size:16,className:"mr-2 animate-spin"}),"Save Changes"]})]}),c.jsxs("div",{className:"flex h-full",children:[c.jsx("div",{className:"w-2/5 shrink-0 border-r border-border overflow-auto",children:c.jsx(sf,{form:m,connection:e,hasOAuthToken:t.hasOAuthToken,onReauthenticate:O,onRemoveOAuth:b})}),c.jsx(mu,{children:c.jsx(F.Suspense,{fallback:c.jsx("div",{className:"w-3/5 min-w-0 flex items-center justify-center",children:c.jsx(yn,{size:32,className:"animate-spin text-muted-foreground"})}),children:c.jsx(xw,{hasMcpBinding:s,stateSchema:o,formState:p??void 0,onFormStateChange:x,onAuthenticate:O,onViewReadme:a,isMCPAuthenticated:t.isMCPAuthenticated,supportsOAuth:t.supportsOAuth,isServerError:t.isServerError,hasReadme:y})})})]})]})}function tj(t){const e=ve.c(5);let n;e[0]!==t.connection?(n={connections:[t.connection],binding:"MCP"},e[0]=t.connection,e[1]=n):n=e[1];const i=Qo(n).length>0;let s;return e[2]!==i||e[3]!==t?(s=c.jsx("div",{className:"flex-1",children:i?c.jsx(gw,{...t,hasMcpBinding:!0}):c.jsx(yw,{...t,hasMcpBinding:!1})}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}export{p1 as F,hw as M,mw as O,tj as S,Qw as u,T1 as v};
|