@pikku/cli 0.12.39 → 0.12.41
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/console-app/assets/{index-Dxl3JsMK.js → index-D9Z9rySK.js} +2 -2
- package/console-app/index.html +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +3 -3
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +6 -6
- package/dist/.pikku/cli/pikku-cli-channel.js +16 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +47 -0
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +2 -2
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +229 -178
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +5 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +13 -9
- package/dist/.pikku/schemas/schemas/LogoutInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/WhoamiInput.schema.json +1 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/cli.wiring.js +45 -0
- package/dist/src/deploy/build-pipeline.d.ts +1 -0
- package/dist/src/deploy/build-pipeline.js +1 -1
- package/dist/src/fabric/fabric-commands.d.ts +63 -63
- package/dist/src/fabric/functions/db-schema.function.d.ts +3 -3
- package/dist/src/fabric/functions/deploy-list.function.d.ts +3 -3
- package/dist/src/fabric/functions/deploy-units.function.d.ts +3 -3
- package/dist/src/fabric/functions/deploy.function.d.ts +6 -6
- package/dist/src/fabric/functions/domains-add.function.d.ts +3 -3
- package/dist/src/fabric/functions/domains-list.function.d.ts +3 -3
- package/dist/src/fabric/functions/domains-remove.function.d.ts +3 -3
- package/dist/src/fabric/functions/errors.function.d.ts +3 -3
- package/dist/src/fabric/functions/init.function.d.ts +3 -3
- package/dist/src/fabric/functions/link.function.d.ts +3 -3
- package/dist/src/fabric/functions/llm-key.function.d.ts +3 -3
- package/dist/src/fabric/functions/login.function.d.ts +3 -3
- package/dist/src/fabric/functions/logs.function.d.ts +3 -3
- package/dist/src/fabric/functions/metrics.function.d.ts +3 -3
- package/dist/src/fabric/functions/rollback.function.d.ts +3 -3
- package/dist/src/fabric/functions/secrets-list.function.d.ts +3 -3
- package/dist/src/fabric/functions/secrets-set.function.d.ts +3 -3
- package/dist/src/fabric/functions/status.function.d.ts +3 -3
- package/dist/src/fabric/functions/trace.function.d.ts +3 -3
- package/dist/src/fabric/functions/validate-core.js +2 -7
- package/dist/src/fabric/functions/validate.function.d.ts +3 -3
- package/dist/src/fabric/functions/validate.function.js +16 -14
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/binary.d.ts +3 -3
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/console.d.ts +3 -3
- package/dist/src/functions/commands/db-audit.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.js +0 -3
- package/dist/src/functions/commands/db-migrate.d.ts +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +1 -1
- package/dist/src/functions/commands/db-reset.js +11 -7
- package/dist/src/functions/commands/db-seed.d.ts +1 -1
- package/dist/src/functions/commands/db-seed.js +4 -7
- package/dist/src/functions/commands/db-shared.js +2 -4
- package/dist/src/functions/commands/deploy-apply.d.ts +3 -3
- package/dist/src/functions/commands/deploy-apply.js +1 -0
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +3 -3
- package/dist/src/functions/commands/deploy-plan.js +1 -0
- package/dist/src/functions/commands/dev.d.ts +3 -3
- package/dist/src/functions/commands/dev.js +1 -1
- package/dist/src/functions/commands/emails-init.d.ts +1 -1
- package/dist/src/functions/commands/enable.d.ts +5 -5
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/login.d.ts +37 -0
- package/dist/src/functions/commands/login.js +85 -0
- package/dist/src/functions/commands/meta.d.ts +31 -31
- package/dist/src/functions/commands/new-addon.d.ts +3 -3
- package/dist/src/functions/commands/new-function.d.ts +3 -3
- package/dist/src/functions/commands/new-middleware.d.ts +3 -3
- package/dist/src/functions/commands/new-permission.d.ts +3 -3
- package/dist/src/functions/commands/new-wiring.d.ts +3 -3
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/skills.d.ts +6 -6
- package/dist/src/functions/commands/tests-coverage.d.ts +3 -3
- package/dist/src/functions/commands/tests-init.d.ts +3 -3
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +3 -3
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/watch.d.ts +3 -3
- package/dist/src/functions/commands/workspace-validate.d.ts +3 -3
- package/dist/src/functions/db/local-db.d.ts +9 -5
- package/dist/src/functions/db/local-db.js +275 -107
- package/dist/src/functions/db/postgres/pglite-kysely.d.ts +8 -0
- package/dist/src/functions/db/postgres/pglite-kysely.js +79 -0
- package/dist/src/functions/db/postgres/postgres-introspector.d.ts +1 -0
- package/dist/src/functions/db/postgres/postgres-introspector.js +6 -1
- package/dist/src/functions/db/postgres/postgres-migrator.d.ts +7 -2
- package/dist/src/functions/db/postgres/postgres-migrator.js +6 -1
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/validate/workspace-validate.js +4 -4
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +38 -7
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +3 -3
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +3 -3
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +2 -2
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +3 -3
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/scaffold/rpc-remote.gen.d.ts +3 -3
- package/dist/src/scaffold/rpc-remote.gen.js +1 -1
- package/dist/src/utils/cli-session.d.ts +40 -0
- package/dist/src/utils/cli-session.js +73 -0
- package/dist/src/utils/device-auth.d.ts +28 -0
- package/dist/src/utils/device-auth.js +111 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/skills/pikku-machine-auth/SKILL.md +177 -0
|
@@ -64,7 +64,7 @@ ${o?`${s(`light`)}{${o}}`:``}`}function Bs({color:e,theme:t,autoContrast:n}){ret
|
|
|
64
64
|
|
|
65
65
|
`))!==-1;){let e=o.slice(0,i);o=o.slice(i+2);let n=e.split(`
|
|
66
66
|
`).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
|
|
67
|
-
`);if(!n)continue;let r;try{r=JSON.parse(n)}catch{continue}t(r)}}}catch(e){a||n?.(e)}})(),{close:()=>{a=!0,i.abort()}}}async fetch(e,t,n,r){return this.verifyServerUrlSet(),e=e.startsWith(`/`)?`${this.options.serverUrl}${e}`:`${this.options.serverUrl}/${e}`,await Lpe(e,n,{...r,method:t,mode:this.options.mode,credentials:this.options.credentials,headers:{...this.getHeaders(),...r?.headers}})}verifyServerUrlSet(){if(!this.options.serverUrl)throw Error(`Server url is not set`)}transformDates(e){return this.options.transformDate===!1?e:Ipe(e)}},uy=class extends Rpe{async post(e,...t){let[n,r]=t;return super.api(e,`POST`,n,r)}async get(e,...t){let[n,r]=t;return super.api(e,`GET`,n,r)}async patch(e,...t){let[n,r]=t;return super.api(e,`PATCH`,n,r)}async head(e,...t){let[n,r]=t;return super.api(e,`HEAD`,n,r)}async delete(e,...t){let[n,r]=t;return super.api(e,`DELETE`,n,r)}async fetch(e,t,n,r){return await super.fetch(e,t,n,r)}};new uy;var dy=class{constructor(){this.pikkuFetch=new uy,this.invoke=((e,t)=>this.pikkuFetch.post(`/rpc/${String(e)}`,{rpcName:String(e),data:t})),this.startWorkflow=async(e,t)=>await this.pikkuFetch.post(`/workflow/${String(e)}/start`,{data:t}),this.runWorkflow=async(e,t)=>await this.pikkuFetch.post(`/workflow/${String(e)}/run`,{data:t}),this.workflowStatus=async(e,t)=>await this.pikkuFetch.get(`/workflow/${String(e)}/status/${t}`),this.agent={run:(async(e,t)=>await this.pikkuFetch.post(`/rpc/agent/${String(e)}`,t)),stream:async(e,t)=>await this.pikkuFetch.post(`/rpc/agent/${String(e)}/stream`,t),approve:async(e,t)=>await this.pikkuFetch.post(`/rpc/agent/${String(e)}/approve`,t)}}setPikkuFetch(e){this.pikkuFetch=e}setServerUrl(e){this.pikkuFetch.setServerUrl(e)}setAuthorizationJWT(e){this.pikkuFetch.setAuthorizationJWT(e)}setAPIKey(e){this.pikkuFetch.setAPIKey(e)}subscribeToSSE(e,t,n){return this.pikkuFetch.subscribeToSSE(e,t,n)}};new dy;const fy=e=>{let t=new uy;t.setServerUrl(e.serverUrl);let n=new dy;return n.setPikkuFetch(t),{fetch:t,rpc:n}};var zpe=`pikku-server-url`,py=`http://localhost:4002`;const my=()=>{try{let e=new URLSearchParams(window.location.search).get(`server`);return e?(localStorage.setItem(zpe,e),e):localStorage.getItem(zpe)||py}catch{return py}},Bpe=e=>{localStorage.setItem(zpe,e)};var hy=(0,A.createContext)(null),Vpe=(0,A.createContext)(null);const gy=(0,A.createContext)(null),Hpe=({children:e,serverUrl:t})=>{let n=t??my(),r=(0,A.useMemo)(()=>fy({serverUrl:n,credentials:`include`}),[n]);return(0,j.jsx)(hy.Provider,{value:r,children:(0,j.jsx)(Vpe.Provider,{value:r.fetch,children:e})})},_y=({children:e})=>{let t=(0,A.useContext)(hy);if(!t)throw Error(`PikkuRPCProvider must be used within PikkuHTTPProvider`);return(0,j.jsx)(gy.Provider,{value:t.rpc,children:e})},vy=()=>{let e=(0,A.useContext)(gy);if(!e)throw Error(`usePikkuRPC must be used within PikkuRPCProvider`);return e},Upe=()=>{let e=(0,A.useContext)(hy);if(!e)throw Error(`usePikkuSSE must be used within PikkuHTTPProvider`);return e.fetch.subscribeToSSE.bind(e.fetch)};var yy=(0,A.createContext)(null);const by=yy.Provider,xy=()=>{let e=(0,A.useContext)(yy);if(!e)throw Error(`useConsoleRouter must be used within a ConsoleRouterProvider`);return e},Sy=()=>xy().Link,Cy=()=>xy().useNavigate(),Wpe=()=>xy().useLocation(),wy=()=>xy().useSearchParams();var Ty=(0,A.forwardRef)(({to:e,children:t,...n},r)=>(0,j.jsx)(rr,{to:e,ref:r,...n,children:t}));Ty.displayName=`Link`;const Ey={Link:Ty,useNavigate:()=>{let e=dn();return t=>e(t)},useLocation:()=>({pathname:cn().pathname}),useSearchParams:Wee},Dy=If,Oy=uf,ky=Hoe,R=lf,Ay=Wd,Gpe=Gd,Kpe=fm,qpe=lg,jy=ah,My=Dse,Ny=Um,Py=Sp,Fy=cf,Iy=Yh,Jpe=Rm,Ly=Rp,Ype=vle,Xpe=sh,Zpe=Lce,Ry=jh,zy=Jh;(0,A.createContext)(null);const z=e=>e,Qpe=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Vy(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)};var By={};const $pe=(e,t,n,r)=>{Vy(n)&&By[n]||(Vy(n)&&(By[n]=new Date),Qpe(e,t,n,r))};var eme=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}};const tme=(e,t,n)=>{e.loadNamespaces(t,eme(e,n))},nme=(e,t,n,r)=>{if(Vy(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return tme(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,eme(e,r))},rme=(e,t,n={})=>!t.languages||!t.languages.length?($pe(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),Vy=e=>typeof e==`string`,ime=e=>typeof e==`object`&&!!e;var ame=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ome={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},sme=e=>ome[e],Hy={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(ame,sme)};const cme=()=>Hy;var lme;const Uy=()=>lme,ume=(0,A.createContext)();var Wy=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},dme=(e,t)=>{let n=(0,A.useRef)();return(0,A.useEffect)(()=>{n.current=t?n.current:e},[e,t]),n.current},fme=(e,t,n,r)=>e.getFixedT(t,n,r),Gy=(e,t,n,r)=>(0,A.useCallback)(fme(e,t,n,r),[e,t,n,r]);const pme=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,A.useContext)(ume)||{},a=n||r||Uy();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Wy),!a){$pe(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let e=(e,t)=>Vy(t)?t:ime(t)&&Vy(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react?.wait&&$pe(a,`DEPRECATED_OPTION`,`useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);let o={...cme(),...a.options.react,...t},{useSuspense:s,keyPrefix:c}=o,l=e||i||a.options?.defaultNS;l=Vy(l)?[l]:l||[`translation`],a.reportNamespaces.addUsedNamespaces?.(l);let u=(a.isInitialized||a.initializedStoreOnce)&&l.every(e=>rme(e,a,o)),d=Gy(a,t.lng||null,o.nsMode===`fallback`?l:l[0],c),f=()=>d,p=()=>fme(a,t.lng||null,o.nsMode===`fallback`?l:l[0],c),[m,h]=(0,A.useState)(f),g=l.join();t.lng&&(g=`${t.lng}${g}`);let _=dme(g),v=(0,A.useRef)(!0);(0,A.useEffect)(()=>{let{bindI18n:e,bindI18nStore:n}=o;v.current=!0,!u&&!s&&(t.lng?nme(a,t.lng,l,()=>{v.current&&h(p)}):tme(a,l,()=>{v.current&&h(p)})),u&&_&&_!==g&&v.current&&h(p);let r=()=>{v.current&&h(p)};return e&&a?.on(e,r),n&&a?.store.on(n,r),()=>{v.current=!1,a&&e&&e?.split(` `).forEach(e=>a.off(e,r)),n&&a&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,g]),(0,A.useEffect)(()=>{v.current&&u&&h(f)},[a,c,u]);let y=[m,a,u];if(y.t=m,y.i18n=a,y.ready=u,u||!u&&!s)return y;throw new Promise(e=>{t.lng?nme(a,t.lng,l,()=>e()):tme(a,l,()=>e())})};function Ky({i18n:e,defaultNS:t,children:n}){let r=(0,A.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,A.createElement)(ume.Provider,{value:r},n)}function qy(){let e=pme();return{...e,t:e.t}}var mme=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),hme=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),gme=e=>{let t=hme(e);return t.charAt(0).toUpperCase()+t.slice(1)},_me=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Jy=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},Yy={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`},Xy=(0,A.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,A.createElement)(`svg`,{ref:c,...Yy,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_me(`lucide`,i),...!a&&!Jy(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,A.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Zy=(e,t)=>{let n=(0,A.forwardRef)(({className:n,...r},i)=>(0,A.createElement)(Xy,{ref:i,iconNode:t,className:_me(`lucide-${mme(gme(e))}`,`lucide-${e}`,n),...r}));return n.displayName=gme(e),n},vme=Zy(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),yme=Zy(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Qy=Zy(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),bme=Zy(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),$y=Zy(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),xme=Zy(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),eb=Zy(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),Sme=Zy(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Cme=Zy(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),tb=Zy(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),nb=Zy(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),wme=Zy(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),rb=Zy(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ib=Zy(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Tme=Zy(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ab=Zy(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),ob=Zy(`clock`,[[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),B=Zy(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Eme=Zy(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),sb=Zy(`copy`,[[`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`}]]),Dme=Zy(`corner-down-right`,[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),cb=Zy(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),lb=Zy(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Ome=Zy(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),kme=Zy(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Ame=Zy(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ub=Zy(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),jme=Zy(`factory`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`,key:`1iv0i2`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Mme=Zy(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Nme=Zy(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),db=Zy(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Pme=Zy(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),fb=Zy(`git-branch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),pb=Zy(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),mb=Zy(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Fme=Zy(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),hb=Zy(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),gb=Zy(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),_b=Zy(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Ime=Zy(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),vb=Zy(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Lme=Zy(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),yb=Zy(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Rme=Zy(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),zme=Zy(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),Bme=Zy(`lock-open`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]]),Vme=Zy(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),bb=Zy(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Hme=Zy(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Ume=Zy(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),xb=Zy(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Sb=Zy(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),Cb=Zy(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Wme=Zy(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),wb=Zy(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Tb=Zy(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Eb=Zy(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),Gme=Zy(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Db=Zy(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ob=Zy(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Kme=Zy(`repeat`,[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]),qme=Zy(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),Jme=Zy(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),kb=Zy(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Ab=Zy(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),jb=Zy(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Mb=Zy(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Yme=Zy(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Xme=Zy(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Zme=Zy(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Nb=Zy(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Qme=Zy(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),$me=Zy(`split`,[[`path`,{d:`M16 3h5v5`,key:`1806ms`}],[`path`,{d:`M8 3H3v5`,key:`15dfkv`}],[`path`,{d:`M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3`,key:`1qrqzj`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}]]),Pb=Zy(`square-function`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3`,key:`m1af9g`}],[`path`,{d:`M9 11.2h5.7`,key:`3zgcl2`}]]),ehe=Zy(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),the=Zy(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),Fb=Zy(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),nhe=Zy(`timer`,[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]),rhe=Zy(`trash-2`,[[`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`}]]),Ib=Zy(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ihe=Zy(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),Lb=Zy(`user-check`,[[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),ahe=Zy(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),ohe=Zy(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),she=Zy(`variable`,[[`path`,{d:`M8 21s-4-3-4-9 4-9 4-9`,key:`uto9ud`}],[`path`,{d:`M16 3s4 3 4 9-4 9-4 9`,key:`4w2vsq`}],[`line`,{x1:`15`,x2:`9`,y1:`9`,y2:`15`,key:`f7djnv`}],[`line`,{x1:`9`,x2:`15`,y1:`9`,y2:`15`,key:`1shsy8`}]]),che=Zy(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),lhe=Zy(`webhook`,[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,key:`q3hayz`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,key:`1go1hn`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,key:`qlwsc0`}]]),uhe=Zy(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Rb=Zy(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),zb=Zy(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Bb=Zy(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);function dhe(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function fhe(e){return(0,A.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var phe=()=>dhe({opened:!1,empty:!1,selected:-1,listId:``,query:``,registeredActions:new Set}),Vb=e=>fhe(e);function Hb(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function mhe(e){Hb(()=>({opened:!0,selected:-1}),e)}function Ub(e){Hb(()=>({opened:!1}),e)}function Wb(e){Hb(e=>({opened:!e.opened,selected:e.opened?e.selected:-1}),e)}function Gb(e,t){t.updateState(t=>({...t,selected:e}))}function Kb(e,t){t.updateState(t=>({...t,listId:e}))}function qb(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t instanceof ShadowRoot?t.host.children:t.children;for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=qb(e,n.shadowRoot);if(t)return t}let i=qb(e,n);if(i)return i}return null}function Jb(e,t){let n=t.getState(),r=n.listId?qb(`#${n.listId}`):null,i=r?.querySelector(`[data-selected]`),a=r?.querySelectorAll(`[data-action]`)??[],o=to(e===-1?a.length-1:e===a.length?0:e,0,a.length-1);return i?.removeAttribute(`data-selected`),a[o]?.scrollIntoView({block:`nearest`}),a[o]?.setAttribute(`data-selected`,`true`),Gb(o,t),o}function Yb(e){return Jb(e.getState().selected+1,e)}function hhe(e){return Jb(e.getState().selected-1,e)}function Xb(e){qb(`#${e.getState().listId} [data-selected]`)?.click()}function Zb(e,t){let n=t.getState();return n.registeredActions.add(e),()=>{n.registeredActions.delete(e)}}function ghe(e,t){Hb(()=>({query:e}),t),Promise.resolve().then(()=>{Jb(0,t),Hb(e=>({empty:e.query.trim().length>0&&e.registeredActions.size===0||!1}),t)})}function _he({clearQuery:e},t){t.updateState(t=>({...t,selected:-1,query:e?``:t.query,empty:e?!1:t.empty}))}var Qb={open:mhe,close:Ub,toggle:Wb,updateState:Hb,setSelectedAction:Gb,setListId:Kb,selectAction:Jb,selectNextAction:Yb,selectPreviousAction:hhe,triggerSelectedAction:Xb,registerAction:Zb,setQuery:ghe,clearSpotlightState:_he};function $b(){let e=phe();return[e,{open:()=>mhe(e),close:()=>Ub(e),toggle:()=>Wb(e)}]}var[ex,tx]=$b(),{open:vhe,close:yhe,toggle:bhe}=tx;function xhe(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}function nx(e){return Array.isArray(e)?e.map(e=>e.trim()).join(`,`).toLowerCase().trim():typeof e==`string`?e.toLowerCase().trim():``}function She(e){return e.reduce((e,t)=>`actions`in t?[...e,...t.actions.map(e=>({...e,group:t.group}))]:[...e,t],[])}function Che(e){let t={},n=[];return e.forEach(e=>{e.group?(t[e.group]||(t[e.group]={pushed:!1,data:{group:e.group,actions:[]}}),t[e.group].data.actions.push(e),t[e.group].pushed||(t[e.group].pushed=!0,n.push(t[e.group].data))):n.push(e)}),n}var whe=(e,t)=>{let n=e.trim().toLowerCase(),r=[[],[]];return She(t).forEach(e=>{e.label?.toLowerCase().includes(n)?r[0].push(e):(e.description?.toLowerCase().includes(n)||nx(e.keywords).includes(n))&&r[1].push(e)}),Che(r.flat())};function The(e,t){if(!Array.isArray(e))return[];let n=0;return e.reduce((e,r)=>{if(n>=t)return e;if(xhe(r)){let i=The(r.actions,t-n);e.push({group:r.group,actions:i}),n+=i.length}else e.push(r),n+=1;return e},[])}var rx={root:`m_d2b315db`,content:`m_3cd250e0`,body:`m_d2abce9b`,search:`m_f366a061`,actionsList:`m_6e463822`,action:`m_d49bb8ef`,actionBody:`m_3d475731`,actionSection:`m_832642f6`,actionLabel:`m_6c2a1345`,actionDescription:`m_a6d9d78d`,empty:`m_82f78f74`,footer:`m_ddcaf054`,actionsGroup:`m_5a3e5f7b`},[Ehe,ix]=Ha(`Spotlight component was not found in tree`),Dhe={dimmedSections:!0,highlightQuery:!1},ax=Kc((e,t)=>{let{className:n,style:r,classNames:i,styles:a,id:o,description:s,label:c,leftSection:l,rightSection:u,children:d,dimmedSections:f,highlightQuery:p,highlightColor:m,closeSpotlightOnTrigger:h,onClick:g,onMouseDown:_,keywords:v,vars:y,...b}=yc(`SpotlightAction`,Dhe,e),x=ix(),S={classNames:i,styles:a},C=p&&typeof c==`string`?(0,j.jsx)(lce,{component:`span`,highlight:x.query,color:m,...x.getStyles(`actionLabel`,S),children:c}):(0,j.jsx)(`span`,{...x.getStyles(`actionLabel`,S),children:c});return(0,j.jsx)(kd,{ref:t,"data-action":!0,...x.getStyles(`action`,{className:n,style:r,...S}),...b,onMouseDown:e=>{e.preventDefault(),_?.(e)},onClick:e=>{g?.(e),(h??x.closeOnActionTrigger)&&Qb.close(x.store)},tabIndex:-1,children:d||(0,j.jsxs)(j.Fragment,{children:[l&&(0,j.jsx)(M,{component:`span`,mod:{position:`left`,dimmed:f},...x.getStyles(`actionSection`,S),children:l}),(0,j.jsxs)(`span`,{...x.getStyles(`actionBody`,S),children:[C,(0,j.jsx)(`span`,{...x.getStyles(`actionDescription`,S),children:s})]}),u&&(0,j.jsx)(M,{component:`span`,mod:{position:`right`,dimmed:f},...x.getStyles(`actionSection`,S),children:u})]})})});ax.classes=rx,ax.displayName=`@mantine/spotlight/SpotlightAction`;var ox=Kc((e,t)=>{let{className:n,style:r,styles:i,classNames:a,label:o,children:s,...c}=yc(`SpotlightActionsGroup`,null,e);return(0,j.jsx)(M,{...ix().getStyles(`actionsGroup`,{className:n,style:r,classNames:a,styles:i}),ref:t,...c,__vars:{"--spotlight-label":`'${o?.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`},children:s})});ox.classes=rx,ox.displayName=`@mantine/core/SpotlightActionsGroup`;var sx=Kc((e,t)=>{let{className:n,style:r,id:i,children:a,vars:o,classNames:s,styles:c,...l}=yc(`SpotlightActionsList`,null,e),u=ix(),d=`mantine-${(0,A.useId)().replace(/:/g,``)}`,f=i||d;return(0,A.useEffect)(()=>(Qb.setListId(f,u.store),()=>Qb.setListId(``,u.store)),[]),(0,j.jsx)(Ed.Autosize,{...u.getStyles(`actionsList`,{className:n,style:r,classNames:s,styles:c}),ref:t,type:`scroll`,scrollbarSize:`var(--spotlight-actions-list-padding)`,offsetScrollbars:`y`,id:f,...l,children:a})});sx.classes=rx,sx.displayName=`@mantine/spotlight/SpotlightActionsList`;var cx=Kc((e,t)=>{let{className:n,style:r,classNames:i,styles:a,...o}=yc(`SpotlightEmpty`,null,e);return(0,j.jsx)(M,{ref:t,...ix().getStyles(`empty`,{classNames:i,styles:a,className:n,style:r}),...o})});cx.classes=rx,cx.displayName=`@mantine/spotlight/SpotlightEmpty`;var lx=Kc((e,t)=>{let{className:n,style:r,classNames:i,styles:a,...o}=yc(`SpotlightFooter`,null,e);return(0,j.jsx)(M,{ref:t,...ix().getStyles(`footer`,{className:n,classNames:i,style:r,styles:a}),...o})});lx.classes=rx,lx.displayName=`@mantine/spotlight/SpotlightFooter`;function ux(e,t){if(!e)return[];let n=()=>Qb.open(t);return Array.isArray(e)?e.map(e=>[e,n]):[[e,n]]}var dx={size:600,yOffset:80,zIndex:Ka(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:ex,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`,maxHeight:400},fx=Kc((e,t)=>{let n=yc(`SpotlightRoot`,dx,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,store:l,children:u,query:d,onQueryChange:f,transitionProps:p,clearQueryOnClose:m,shortcut:h,tagsToIgnore:g,triggerOnContentEditable:_,disabled:v,onSpotlightOpen:y,onSpotlightClose:b,forceOpened:x,closeOnActionTrigger:S,maxHeight:C,scrollable:w,attributes:T,...E}=n,D=Fs(),{opened:O,query:k}=Vb(l),ee=typeof d==`string`?d:k,te=e=>{f?.(e),Qb.setQuery(e,l)},ne=mc({name:`Spotlight`,classes:rx,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:T});return Rte(ux(h,l),g,_),fo(()=>{O?y?.():b?.()},[O]),v?null:(0,j.jsx)(Ehe,{value:{getStyles:ne,query:ee,setQuery:te,store:l,closeOnActionTrigger:S},children:(0,j.jsx)(nm,{ref:t,...E,withCloseButton:!1,opened:O||!!x,padding:0,onClose:()=>Qb.close(l),className:i,style:a,classNames:ts({theme:D,classNames:[rx,r],props:n,stylesCtx:void 0}),styles:ns({theme:D,styles:o,props:n,stylesCtx:void 0}),transitionProps:{...p,onExited:()=>{m&&te(``),Qb.clearSpotlightState({clearQuery:m},l),p?.onExited?.()}},__vars:{"--spotlight-max-height":w?Ra(C):void 0},__staticSelector:`Spotlight`,"data-scrollable":w||void 0,children:u})})});fx.classes=rx,fx.displayName=`@mantine/spotlight/SpotlightRoot`;var px={size:`lg`},mx=Kc((e,t)=>{let{classNames:n,styles:r,onKeyDown:i,onChange:a,vars:o,value:s,...c}=yc(`SpotlightSearch`,px,e),l=ix(),u=l.getStyles(`search`),[d,f]=(0,A.useState)(!1),p=e=>{i?.(e),!d&&(e.nativeEvent.code===`ArrowDown`&&(e.preventDefault(),Qb.selectNextAction(l.store)),e.nativeEvent.code===`ArrowUp`&&(e.preventDefault(),Qb.selectPreviousAction(l.store)),(e.nativeEvent.code===`Enter`||e.nativeEvent.code===`NumpadEnter`)&&(e.preventDefault(),Qb.triggerSelectedAction(l.store)))};return(0,j.jsx)(nf,{ref:t,classNames:[{input:u.className},n],styles:[{input:u.style},r],...c,value:s??l.query,onChange:e=>{l.setQuery(e.currentTarget.value),a?.(e)},onKeyDown:p,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});mx.classes=rx,mx.displayName=`@mantine/spotlight/SpotlightSearch`;var hx={size:600,yOffset:80,limit:1/0,zIndex:Ka(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:ex,filter:whe,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`},gx=Kc((e,t)=>{let{searchProps:n,filter:r,query:i,onQueryChange:a,actions:o,nothingFound:s,highlightQuery:c,limit:l,scrollAreaProps:u,...d}=yc(`Spotlight`,hx,e),[f,p]=No({value:i,defaultValue:``,finalValue:``,onChange:a}),m=The(r(f,o),l).map(e=>{if(xhe(e)){let t=e.actions.map(({id:e,...t})=>(0,j.jsx)(ax,{highlightQuery:c,...t},e));return(0,j.jsx)(ox,{label:e.group,children:t},e.group)}return(0,j.jsx)(ax,{highlightQuery:c,...e},e.id)});return(0,j.jsxs)(fx,{...d,query:f,onQueryChange:p,ref:t,children:[(0,j.jsx)(mx,{...n}),(0,j.jsxs)(sx,{...u,children:[m,m.length===0&&s&&(0,j.jsx)(cx,{children:s})]})]})});gx.classes=rx,gx.displayName=`@mantine/spotlight/Spotlight`,gx.Search=mx,gx.ActionsList=sx,gx.Action=ax,gx.Empty=cx,gx.ActionsGroup=ox,gx.Footer=lx,gx.Root=fx,gx.open=tx.open,gx.close=tx.close,gx.toggle=tx.toggle;var Ohe=(0,A.createContext)(void 0);const _x=()=>{let e=(0,A.useContext)(Ohe);if(!e)throw Error(`usePikkuMeta must be used within PikkuMetaProvider`);return e};var khe={functions:[],httpMeta:[],cliMeta:[],cliRenderers:{},channelsMeta:{},queueMeta:{},schedulerMeta:{},rpcMeta:{},mcpMeta:[],workflows:{},triggerMeta:{},triggerSourceMeta:{},middlewareGroupsMeta:{definitions:{},instances:{},httpGroups:{},tagGroups:{}},permissionsGroupsMeta:{definitions:{},httpGroups:{},tagGroups:{}},agentsMeta:{},emailsMeta:{src:``,themeHash:``,templates:{}},secretsMeta:{},credentialsMeta:{},variablesMeta:{}},Ahe={functions:0,workflows:0,httpRoutes:0,channels:0,mcpTools:0,schedulers:0,queues:0,cliCommands:0,rpcMethods:0,triggers:0,triggerSources:0,agents:0,emails:0,secrets:0,variables:0};const jhe=({children:e})=>{let t=vy(),[n,r]=(0,A.useState)(khe),[i,a]=(0,A.useState)(Ahe),[o,s]=(0,A.useState)({}),[c,l]=(0,A.useState)(!0),[u,d]=(0,A.useState)(null),f=(0,A.useCallback)(async()=>{l(!0),d(null);try{let e=await t.invoke(`console:getAllMeta`);r({functions:e.functions,httpMeta:e.httpMeta,cliMeta:e.cliMeta,cliRenderers:e.cliRenderers,channelsMeta:e.channelsMeta,queueMeta:e.queueMeta,schedulerMeta:e.schedulerMeta,rpcMeta:e.rpcMeta,mcpMeta:e.mcpMeta,workflows:e.workflows,triggerMeta:e.triggerMeta,triggerSourceMeta:e.triggerSourceMeta,middlewareGroupsMeta:e.middlewareGroupsMeta,permissionsGroupsMeta:e.permissionsGroupsMeta,agentsMeta:e.agentsMeta,emailsMeta:e.emailsMeta,secretsMeta:e.secretsMeta,credentialsMeta:e.credentialsMeta??{},variablesMeta:e.variablesMeta}),a(e.counts),s(e.functionUsedBy)}catch(e){d(e.message||`Failed to load metadata`)}finally{l(!1)}},[t]);(0,A.useEffect)(()=>{f()},[f]);let p=(0,A.useMemo)(()=>{let e=new Map;for(let[t,n]of Object.entries(o))e.set(t,n);return e},[o]);return(0,j.jsx)(Ohe.Provider,{value:{meta:n,counts:i,functionUsedBy:p,loading:c,error:u,refresh:f},children:e})};var vx={flexColumn:`_flexColumn_a6ki2_3`,flexRow:`_flexRow_a6ki2_9`,flexGrow:`_flexGrow_a6ki2_14`,overflowAuto:`_overflowAuto_a6ki2_19`,overflowHidden:`_overflowHidden_a6ki2_23`,noShrink:`_noShrink_a6ki2_27`,listDetailContainer:`_listDetailContainer_a6ki2_33`,listPane:`_listPane_a6ki2_38`,listPaneFlex:`_listPaneFlex_a6ki2_43 _listPane_a6ki2_38`,listPaneFixed:`_listPaneFixed_a6ki2_48 _listPane_a6ki2_38`,detailPane:`_detailPane_a6ki2_52`,detailDrawerPane:`_detailDrawerPane_a6ki2_58`,gridHeader:`_gridHeader_a6ki2_69`,gridHeaderLabel:`_gridHeaderLabel_a6ki2_77`,listItem:`_listItem_a6ki2_84`,listItemPadded:`_listItemPadded_a6ki2_96 _listItem_a6ki2_84`,detailHeader:`_detailHeader_a6ki2_106`,detailBody:`_detailBody_a6ki2_115`,metaRow:`_metaRow_a6ki2_122`,metaRowLabel:`_metaRowLabel_a6ki2_130`,metaRowContent:`_metaRowContent_a6ki2_135`,sectionLabel:`_sectionLabel_a6ki2_142`,emptyState:`_emptyState_a6ki2_149`,surfaceCard:`_surfaceCard_a6ki2_158`,tableLastRowBorder:`_tableLastRowBorder_a6ki2_164`,listSurfaceCard:`_listSurfaceCard_a6ki2_168 _surfaceCard_a6ki2_158`,tagBadge:`_tagBadge_a6ki2_179`,serviceBadge:`_serviceBadge_a6ki2_185`,clickableText:`_clickableText_a6ki2_193`,splitLeft:`_splitLeft_a6ki2_199`,splitRight:`_splitRight_a6ki2_206`,codeInputBox:`_codeInputBox_a6ki2_215`,separator:`_separator_a6ki2_227`,groupLabel:`_groupLabel_a6ki2_235`,typeDot:`_typeDot_a6ki2_244`,drawerButton:`_drawerButton_a6ki2_253`,drawerIconBox:`_drawerIconBox_a6ki2_259`,centeredLoader:`_centeredLoader_a6ki2_263`,chatMessageRight:`_chatMessageRight_a6ki2_268`,chatMessageLeft:`_chatMessageLeft_a6ki2_274`};const Mhe=[{title:z(`Run`),items:[{label:z(`Functions`),href:`/functions`,icon:Pb,matchPrefix:`/functions`},{label:z(`Workflows`),href:`/workflow`,icon:fb,matchPrefix:`/workflow`},{label:z(`Agents`),href:`/agents`,icon:$y,matchPrefix:`/agents`},{label:z(`Tests`),href:`/tests`,icon:Nme,matchPrefix:`/tests`}]},{title:z(`Data`),items:[{label:z(`Database`),href:`/database`,icon:lb,matchPrefix:`/database`},{label:z(`APIs`),href:`/apis`,icon:mb,matchPrefix:`/apis`},{label:z(`Jobs`),href:`/jobs`,icon:ob,matchPrefix:`/jobs`},{label:z(`Runtime`),href:`/runtime`,icon:jb,matchPrefix:`/runtime`},{label:z(`Emails`),href:`/emails`,icon:bb,matchPrefix:`/emails`}]},{title:z(`Config`),items:[{label:z(`Secrets`),href:`/secrets`,icon:hb,matchPrefix:`/secrets`},{label:z(`Environment Variables`),href:`/variables`,icon:she,matchPrefix:`/variables`},{label:z(`Addons`),href:`/addons`,icon:xb,matchPrefix:`/addons`}]},{title:z(`Users`),items:[{label:z(`OAuth`),href:`/users`,icon:ohe,matchPrefix:`/users`},{label:z(`Credentials`),href:`/credentials`,icon:hb,matchPrefix:`/credentials`}]},{title:z(``),items:[{label:z(`Changes`),href:`/changes`,icon:pb,matchPrefix:`/changes`}]}];var Nhe={logo:(0,j.jsx)(`img`,{src:`/`+`pikku-console-logo.png`.replace(/^\//,``),alt:`Pikku Console`,width:28,height:28,style:void 0}),title:z(`Pikku Console`),tooltipLabel:z(`Pikku Console`),homeHref:`/`},yx=60,bx=210;const xx=({sections:e=Mhe,branding:t=Nhe,footer:n})=>{let r=Sy(),{t:i}=qy(),a=Fs(),{pathname:o}=Wpe(),{refresh:s,loading:c}=_x(),[l,u]=Do({key:`sidebar-collapsed`,defaultValue:!1}),{colorScheme:d,toggleColorScheme:f}=_c(),p=l?yx:bx,m=e=>o.includes(e.matchPrefix);return(0,j.jsxs)(M,{pos:`fixed`,left:0,top:0,w:p,h:`100vh`,style:{borderRight:`1px solid var(--app-glass-border)`,backgroundColor:`var(--mantine-color-body)`,display:`flex`,flexDirection:`column`,transition:`width 200ms ease`,overflow:`hidden`,zIndex:100},children:[(0,j.jsxs)(M,{px:l?`xs`:`sm`,py:`xs`,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`space-between`,height:50,flexShrink:0},children:[(0,j.jsx)(jy,{label:t.tooltipLabel,position:`right`,disabled:!l,children:(0,j.jsxs)(r,{to:t.homeHref,style:{display:`flex`,alignItems:`center`,gap:8,textDecoration:`none`,color:`inherit`},children:[t.logo,!l&&(0,j.jsx)(R,{size:`lg`,fw:500,children:t.title})]})}),!l&&(0,j.jsx)(jy,{label:i(`sidebar.search`),children:(0,j.jsx)(Ay,{variant:`subtle`,size:`sm`,color:`gray`,onClick:tx.open,children:(0,j.jsx)(Ab,{size:16})})})]}),(0,j.jsx)(M,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`},py:4,children:e.map((e,t)=>(0,j.jsxs)(M,{children:[t>0&&(0,j.jsx)(My,{my:4,mx:`sm`}),e.title&&(l?null:(0,j.jsx)(R,{size:`xs`,fw:600,px:`sm`,style:{color:`var(--mantine-color-dimmed)`,textTransform:`uppercase`,letterSpacing:`0.06em`,fontSize:10,paddingTop:8,paddingBottom:2},children:e.title})),e.items.map(e=>{let t=m(e);return l?(0,j.jsx)(jy,{label:e.label,position:`right`,children:(0,j.jsx)(M,{px:6,py:2,children:(0,j.jsx)(Kpe,{component:r,to:e.href,active:t,leftSection:(0,j.jsx)(e.icon,{size:18}),variant:`light`,style:{borderRadius:a.radius.sm,justifyContent:`center`,padding:`8px 0`},styles:{section:{marginRight:0},body:{display:`none`}}})})},e.href):(0,j.jsx)(M,{px:6,py:1,children:(0,j.jsx)(Kpe,{component:r,to:e.href,label:e.label,leftSection:(0,j.jsx)(e.icon,{size:16}),active:t,variant:`light`,style:{borderRadius:a.radius.sm,fontSize:13}})},e.href)})]},t))}),n&&(0,j.jsxs)(M,{className:vx.noShrink,px:6,py:4,children:[(0,j.jsx)(My,{mx:`sm`,mb:4}),n]}),(0,j.jsxs)(M,{className:vx.noShrink,children:[(0,j.jsx)(My,{mx:`sm`}),(0,j.jsxs)(xh,{gap:2,px:6,py:4,children:[(0,j.jsx)(jy,{label:i(`sidebar.refreshMetadata`),position:`right`,disabled:!l,children:(0,j.jsxs)(kd,{onClick:()=>s(),disabled:c,px:l?0:10,py:8,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`flex-start`,gap:10,borderRadius:6,color:`var(--mantine-color-dimmed)`,opacity:c?.5:1},children:[(0,j.jsx)(Ob,{size:18,style:c?{animation:`spin 1s linear infinite`}:void 0}),!l&&(0,j.jsx)(R,{size:`sm`,children:i(`sidebar.refresh`)})]})}),(0,j.jsx)(jy,{label:i(d===`dark`?`sidebar.switchToLight`:`sidebar.switchToDark`),position:`right`,children:(0,j.jsxs)(kd,{onClick:()=>f(),px:l?0:10,py:8,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`flex-start`,gap:10,borderRadius:6,color:`var(--mantine-color-dimmed)`},children:[d===`dark`?(0,j.jsx)(ehe,{size:18}):(0,j.jsx)(Ume,{size:18}),!l&&(0,j.jsx)(R,{size:`sm`,children:i(d===`dark`?`sidebar.lightMode`:`sidebar.darkMode`)})]})}),(0,j.jsx)(jy,{label:i(l?`sidebar.expand`:`sidebar.collapse`),position:`right`,disabled:!l,children:(0,j.jsxs)(kd,{onClick:()=>u(!l),px:l?0:10,py:8,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`flex-start`,gap:10,borderRadius:6,color:`var(--mantine-color-dimmed)`},children:[l?(0,j.jsx)(Cb,{size:18}):(0,j.jsx)(Sb,{size:18}),!l&&(0,j.jsx)(R,{size:`sm`,children:i(`sidebar.collapse`)})]})})]})]})]})},Phe=()=>{let{meta:e}=_x(),t=Cy();return(0,j.jsx)(gx,{actions:(0,A.useMemo)(()=>{let n=[];if(e.functions?.forEach(e=>{n.push({id:`fn-${e.pikkuFuncId}`,label:e.pikkuFuncId,description:`Function`,leftSection:(0,j.jsx)(Pb,{size:16}),onClick:()=>t(`/functions`)})}),e.workflows)for(let[r]of Object.entries(e.workflows))n.push({id:`wf-${r}`,label:r,description:`Workflow`,leftSection:(0,j.jsx)(fb,{size:16}),onClick:()=>t(`/workflow?id=${encodeURIComponent(r)}`)});if(e.httpMeta?.forEach(e=>{let r=`${e.method?.toUpperCase()} ${e.route}`;n.push({id:`http-${r}`,label:r,description:`HTTP → ${e.pikkuFuncId||``}`,leftSection:(0,j.jsx)(mb,{size:16}),onClick:()=>t(`/apis?tab=http`)})}),e.channelsMeta)for(let[r]of Object.entries(e.channelsMeta))n.push({id:`ch-${r}`,label:r,description:`Channel`,leftSection:(0,j.jsx)(Db,{size:16}),onClick:()=>t(`/apis?tab=channels`)});if(e.mcpMeta?.forEach(e=>{n.push({id:`mcp-${e.wireId||e.name}`,label:e.name||e.wireId,description:`MCP ${e.method||``}`,leftSection:(0,j.jsx)(cb,{size:16}),onClick:()=>t(`/apis?tab=mcp`)})}),e.cliMeta?.forEach(e=>{let r=(i,a)=>{if(i)for(let[o,s]of Object.entries(i)){let i=a?`${a} ${o}`:o;s.pikkuFuncId&&n.push({id:`cli-${e.wireId}-${i}`,label:`${e.wireId} ${i}`,description:`CLI → ${s.pikkuFuncId}`,leftSection:(0,j.jsx)(Fb,{size:16}),onClick:()=>t(`/apis?tab=cli`)}),s.subcommands&&r(s.subcommands,i)}};r(e.commands,``)}),e.schedulerMeta)for(let[r,i]of Object.entries(e.schedulerMeta))n.push({id:`sched-${r}`,label:r,description:`Scheduler${i.schedule?` (${i.schedule})`:``}`,leftSection:(0,j.jsx)(ob,{size:16}),onClick:()=>t(`/jobs?tab=schedulers`)});if(e.queueMeta)for(let[r]of Object.entries(e.queueMeta))n.push({id:`queue-${r}`,label:r,description:`Queue Worker`,leftSection:(0,j.jsx)(yb,{size:16}),onClick:()=>t(`/jobs?tab=queues`)});if(e.agentsMeta)for(let[r,i]of Object.entries(e.agentsMeta))n.push({id:`agent-${r}`,label:r,description:`Agent${i.model?` (${i.model})`:``}`,leftSection:(0,j.jsx)($y,{size:16}),onClick:()=>t(`/agents`)});return n},[e,t]),nothingFound:`No results found`,searchProps:{placeholder:`Search functions, routes, workflows...`},shortcut:[`mod + K`],highlightQuery:!0})};function Fhe(e,t){let n=e.toLowerCase();return n.includes(`fetch`)||n.includes(`network`)||n.includes(`econnrefused`)||n.includes(`failed to fetch`)?{titleKey:`connection.errors.connection_refused`,hint:`Make sure your Pikku server is running at ${t}`}:n.includes(`404`)||n.includes(`not found`)||n.includes(`rpc function`)?{titleKey:`connection.errors.addon_not_found`,hint:`The @pikku/addon-console package may not be installed. Add it to your project and run pikku to generate the bootstrap.`}:n.includes(`cors`)||n.includes(`cross-origin`)?{titleKey:`connection.errors.cors_error`,hint:`Your Pikku server may need CORS configured to allow requests from the console origin.`}:n.includes(`timeout`)?{titleKey:`connection.errors.timeout`,hint:`The server took too long to respond. Check if it is under heavy load or unreachable.`}:{titleKey:`connection.errors.connection_failed`,hint:e}}const Ihe=({error:e})=>{let{t}=qy(),[n,r]=(0,A.useState)(my),i=Fhe(e,n);return(0,j.jsx)(Wf,{h:`100vh`,children:(0,j.jsx)(Md,{p:`xl`,radius:`lg`,maw:420,w:`100%`,withBorder:!0,children:(0,j.jsxs)(xh,{gap:`lg`,align:`center`,children:[(0,j.jsxs)(M,{children:[(0,j.jsx)(Wf,{children:(0,j.jsx)(`img`,{src:`/pikku-console-logo.png`,alt:`Pikku Console`,width:48,height:48})}),(0,j.jsx)(R,{size:`xl`,fw:500,ta:`center`,mt:`xs`,children:t(`connection.title`)})]}),(0,j.jsx)(Fy,{icon:(0,j.jsx)(Ib,{size:16}),color:`red`,variant:`light`,title:t(i.titleKey),w:`100%`,children:(0,j.jsx)(R,{size:`sm`,children:z(i.hint)})}),(0,j.jsx)(Iy,{label:t(`connection.server_url_label`),value:n,onChange:e=>r(e.currentTarget.value),w:`100%`}),(0,j.jsx)(Dy,{fullWidth:!0,variant:`default`,onClick:()=>{Bpe(n.trim()),window.location.reload()},children:t(`connection.reconnect`)})]})})})};var Lhe=({children:e,sidebar:t})=>{let{loading:n,error:r}=_x(),[i]=Do({key:`sidebar-collapsed`,defaultValue:!1}),a=i?60:210;return n?(0,j.jsx)(Wf,{h:`100vh`,children:(0,j.jsx)(Hd,{size:`lg`})}):r?(0,j.jsx)(Ihe,{error:r}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Phe,{}),(0,j.jsx)(xx,{...t}),(0,j.jsx)(M,{ml:a,h:`100vh`,style:{transition:`margin-left 200ms ease`},children:e})]})};const Rhe=({children:e,sidebar:t})=>(0,j.jsx)(jhe,{children:(0,j.jsx)(Lhe,{sidebar:t,children:e})});var Sx={root:`_root_2wiyz_1`,label:`_label_2wiyz_6`,description:`_description_2wiyz_19`,title:`_title_2wiyz_26`};const Cx=()=>{let e=Cy(),{t}=qy();return(0,j.jsxs)(up,{className:Sx.root,children:[(0,j.jsx)(`div`,{className:Sx.label,children:`404`}),(0,j.jsx)(qpe,{className:Sx.title,children:t(`not_found.title`)}),(0,j.jsx)(R,{c:`dimmed`,size:`lg`,ta:`center`,className:Sx.description,children:t(`not_found.description`)}),(0,j.jsx)(Kd,{justify:`center`,children:(0,j.jsx)(Dy,{variant:`subtle`,size:`md`,onClick:()=>{e(`/`)},children:t(`not_found.go_home`)})})]})};var zhe=({href:e})=>{let{t}=qy();return(0,j.jsx)(jy,{label:t(`common.docs_link`),children:(0,j.jsx)(Dy,{component:`a`,href:e,target:`_blank`,rel:`noopener noreferrer`,variant:`default`,color:`gray`,size:`xs`,px:`xs`,children:(0,j.jsx)(kme,{size:14})})})};const wx=(0,A.createContext)(null);function Bhe(){return(0,A.useContext)(wx)}function Tx({title:e,description:t,docsHref:n,lead:r,filters:i,view:a}){let o=n?(0,j.jsx)(zhe,{href:n}):null,s=(0,j.jsxs)(xh,{gap:2,style:{minWidth:0,flex:1},children:[(0,j.jsx)(R,{fw:600,size:`xl`,c:`var(--app-text)`,truncate:!0,style:{minWidth:0},children:e}),t!=null&&(typeof t==`string`?(0,j.jsx)(R,{size:`md`,c:`dimmed`,children:t}):(0,j.jsx)(R,{size:`md`,c:`dimmed`,component:`div`,children:t}))]});return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(Kd,{justify:`space-between`,align:`center`,wrap:`nowrap`,gap:`md`,visibleFrom:`lg`,children:[s,i&&(0,j.jsx)(Kd,{gap:`sm`,wrap:`nowrap`,style:{flexShrink:0},children:i}),a&&(0,j.jsx)(Kd,{gap:`xs`,wrap:`nowrap`,style:{flexShrink:0},children:a}),r&&(0,j.jsx)(Kd,{gap:`xs`,wrap:`nowrap`,style:{flexShrink:0},children:r}),o]}),(0,j.jsxs)(xh,{gap:`xs`,hiddenFrom:`lg`,children:[(0,j.jsxs)(Kd,{justify:`space-between`,align:`center`,wrap:`nowrap`,gap:`md`,children:[s,(0,j.jsxs)(Kd,{gap:`xs`,wrap:`nowrap`,style:{flexShrink:0},children:[r,o]})]}),(i||a)&&(0,j.jsx)(Vhe,{filters:i,view:a})]})]})}function Ex({children:e,style:t,fullWidth:n=!1,noPadding:r=!1,header:i,contentGap:a,emptyState:o,loading:s,...c}){let l=Bhe(),u=s??o??l??e,d=i?(0,j.jsxs)(xh,{gap:a??`md`,style:{flex:1,minWidth:0,minHeight:0},children:[i,u]}):u;return(0,j.jsx)(up,{size:n?void 0:`lg`,fluid:n,py:r?0:`xl`,px:r?0:`xl`,...c,style:{flex:1,display:`flex`,flexDirection:`column`,width:`100%`,minWidth:0,minHeight:0,...t},children:d})}function Vhe({lead:e,view:t,filters:n}){return!e&&!t&&!n?null:(0,j.jsxs)(Kd,{gap:`sm`,wrap:`nowrap`,align:`center`,style:{width:`100%`,minWidth:0},children:[e&&(0,j.jsx)(Kd,{gap:`xs`,wrap:`nowrap`,align:`center`,style:{flexShrink:0},children:e}),e?(0,j.jsxs)(Kd,{gap:`sm`,wrap:`nowrap`,align:`center`,style:{marginLeft:`auto`,flexShrink:0},children:[n,t]}):(0,j.jsxs)(j.Fragment,{children:[n,t&&(0,j.jsx)(Kd,{gap:`sm`,wrap:`nowrap`,align:`center`,style:{marginLeft:`auto`},children:t})]})]})}var Hhe=({label:e,count:t,icon:n,href:r})=>(0,j.jsx)(Md,{component:Sy(),to:r,p:`md`,radius:`md`,withBorder:!0,style:{textDecoration:`none`,color:`inherit`,transition:`box-shadow 150ms ease, transform 150ms ease`,cursor:`pointer`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`var(--mantine-shadow-md)`,e.currentTarget.style.transform=`translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=``,e.currentTarget.style.transform=``},children:(0,j.jsxs)(Kd,{gap:`md`,wrap:`nowrap`,children:[(0,j.jsx)(M,{style:{width:40,height:40,borderRadius:8,backgroundColor:`rgba(255,255,255,0.04)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--mantine-color-dimmed)`},children:(0,j.jsx)(n,{size:20})}),(0,j.jsxs)(xh,{gap:0,children:[(0,j.jsx)(R,{size:`xl`,fw:700,children:t}),(0,j.jsx)(R,{size:`sm`,c:`dimmed`,children:e})]})]})});const Uhe=()=>{let{t:e}=qy(),{counts:t,loading:n}=_x();if(n)return(0,j.jsx)(Wf,{h:`100vh`,children:(0,j.jsx)(Hd,{})});let r=[{label:e(`overview.functions`),count:t.functions,icon:Pb,href:`/functions`},{label:e(`overview.workflows`),count:t.workflows,icon:fb,href:`/workflow`},{label:e(`overview.agents`),count:t.agents,icon:$y,href:`/agents`},{label:e(`overview.http_routes`),count:t.httpRoutes,icon:mb,href:`/apis?tab=http`},{label:e(`overview.channels`),count:t.channels,icon:Db,href:`/apis?tab=channels`},{label:e(`overview.mcp_tools`),count:t.mcpTools,icon:cb,href:`/apis?tab=mcp`},{label:e(`overview.cli_commands`),count:t.cliCommands,icon:Fb,href:`/apis?tab=cli`},{label:e(`overview.schedulers`),count:t.schedulers,icon:ob,href:`/jobs?tab=schedulers`},{label:e(`overview.queues`),count:t.queues,icon:yb,href:`/jobs?tab=queues`},{label:e(`overview.emails`),count:t.emails,icon:bb,href:`/emails`}];return(0,j.jsxs)(Ex,{children:[(0,j.jsx)(Tx,{title:e(`overview.title`),description:e(`overview.description`)}),(0,j.jsx)(dh,{cols:{base:1,xs:2,sm:3,md:4},spacing:`md`,children:r.map(e=>(0,j.jsx)(Hhe,{...e},String(e.label)))})]})};function Whe(e){return e.replace(/([A-Z])/g,` $1`).replace(/^(.)/,e=>e.toUpperCase()).trim()}var Ghe=(0,A.createContext)(void 0);const Dx=()=>{let e=(0,A.useContext)(Ghe);if(!e)throw Error(`usePanelContext must be used within PanelProvider`);return e},Ox=({children:e})=>{let[t,n]=(0,A.useState)(new Map),[r,i]=(0,A.useState)(null),a=(0,A.useCallback)((e,t,r,a)=>{let o=`${e}-${t}`;n(n=>{let i=new Map(n);return i.set(o,{id:o,title:r,data:{type:e,id:t,metadata:a},activeChildId:`configuration`,history:[]}),i}),i(o)},[]),o=(0,A.useCallback)((e,t)=>{a(`function`,e,t?.displayName||Whe(e),t)},[a]),s=(0,A.useCallback)((e,t)=>{a(`http`,e,e,t)},[a]),c=(0,A.useCallback)((e,t)=>{a(`channel`,e,e,t)},[a]),l=(0,A.useCallback)((e,t)=>{a(`rpc`,e,e,t)},[a]),u=(0,A.useCallback)((e,t)=>{a(`scheduler`,e,e,t)},[a]),d=(0,A.useCallback)((e,t)=>{a(`queue`,e,e,t)},[a]),f=(0,A.useCallback)((e,t)=>{a(`cli`,e,e,t)},[a]),p=(0,A.useCallback)((e,t)=>{a(`mcp`,e,e,t)},[a]),m=(0,A.useCallback)((e,t,n)=>{a(`workflowStep`,e,n?.stepName||n?.title||`${t} Step`,{...n,stepType:t})},[a]),h=(0,A.useCallback)((e,t)=>{a(`workflow`,e,t?.name||e,t)},[a]),g=(0,A.useCallback)((e,t)=>{a(`trigger`,e,e,t)},[a]),_=(0,A.useCallback)((e,t)=>{a(`triggerSource`,e,e,t)},[a]),v=(0,A.useCallback)((e,t)=>{a(`middleware`,e,t?.name||t?.exportedName||e,t)},[a]),y=(0,A.useCallback)((e,t)=>{a(`permission`,e,t?.name||t?.exportedName||e,t)},[a]),b=(0,A.useCallback)((e,t)=>{a(`agent`,e,t?.name||e,t)},[a]),x=(0,A.useCallback)((e,t)=>{a(`secret`,e,t?.displayName||e,t)},[a]),S=(0,A.useCallback)((e,t)=>{a(`variable`,e,t?.displayName||e,t)},[a]),C=(0,A.useCallback)((e,t)=>{a(`credentialUser`,e,`User: ${e}`,t)},[a]),w=(0,A.useCallback)((e,t)=>{a(`authProvider`,e,t?.name||e,t)},[a]),T=(0,A.useCallback)((e,t,n)=>{a(`dbColumn`,`${e}.${t}`,t,{...n,tableName:e,columnName:t})},[a]),E=(0,A.useCallback)((e,t,i,a)=>{n(n=>{let o=Array.from(n.keys()).find(e=>e===r);if(!o)return n;let s=n.get(o);if(!s)return n;let c=new Map(n);return c.set(o,{...s,history:[...s.history,{title:s.title,data:s.data}],title:i,data:{type:e,id:t,metadata:a}}),c})},[r]),D=(0,A.useCallback)(()=>{n(e=>{if(!r)return e;let t=e.get(r);if(!t||t.history.length===0)return e;let n=[...t.history],i=n.pop(),a=new Map(e);return a.set(r,{...t,history:n,title:i.title,data:i.data}),a})},[r]),O=(0,A.useCallback)(e=>{n(t=>{if(!r)return t;let n=t.get(r);if(!n||e<0||e>=n.history.length)return t;let i=n.history[e],a=new Map(t);return a.set(r,{...n,history:n.history.slice(0,e),title:i.title,data:i.data}),a})},[r]),k=(0,A.useCallback)(e=>{n(t=>{let n=new Map(t);return n.delete(e),n}),i(n=>{if(n===e){let n=Array.from(t.keys()).filter(t=>t!==e);return n.length>0?n[0]:null}return n})},[t]),ee=(0,A.useCallback)(e=>{i(e)},[]),te=(0,A.useCallback)((e,t)=>{n(n=>{let r=new Map(n),i=r.get(e);return i&&r.set(e,{...i,activeChildId:t}),r})},[]);return(0,j.jsx)(Ghe.Provider,{value:{panels:t,activePanel:r,openFunction:o,openHTTPWire:s,openChannel:c,openRPC:l,openScheduler:u,openQueue:d,openCLI:f,openMCP:p,openWorkflowStep:m,openWorkflow:h,openTrigger:g,openTriggerSource:_,openMiddleware:v,openPermission:y,openAgent:b,openSecret:x,openVariable:S,openCredentialUser:C,openAuthProvider:w,openDbColumn:T,navigateInPanel:E,goBack:D,goBackTo:O,closePanel:k,setActivePanel:ee,setActiveChild:te},children:e})},Khe={GET:{color:`cyan`,label:`GET`},POST:{color:`violet`,label:`POST`},PUT:{color:`yellow`,label:`PUT`},PATCH:{color:`orange`,label:`PATCH`},DELETE:{color:`red`,label:`DEL`},HEAD:{color:`gray`,label:`HEAD`},OPTIONS:{color:`gray`,label:`OPTIONS`}},qhe={resource:{color:`blue`,label:`resource`},tool:{color:`orange`,label:`tool`},prompt:{color:`violet`,label:`prompt`}},kx={pikkuFunc:{label:`Function`,color:`blue`},pikkuSessionlessFunc:{label:`Function`,color:`blue`},pikkuVoidFunc:{label:`Void`,color:`gray`},pikkuChannelFunc:{label:`Channel`,color:`cyan`},pikkuChannelConnectionFunc:{label:`Channel Connect`,color:`cyan`},pikkuChannelDisconnectionFunc:{label:`Channel Disconnect`,color:`cyan`},pikkuMCPResourceFunc:{label:`MCP Resource`,color:`orange`},pikkuMCPToolFunc:{label:`MCP Tool`,color:`orange`},pikkuMCPPromptFunc:{label:`MCP Prompt`,color:`orange`},pikkuTriggerFunc:{label:`Trigger Source`,color:`yellow`},pikkuWorkflowFunc:{label:`Workflow`,color:`violet`}},Jhe={http:{color:`green`,label:`HTTP`},channel:{color:`cyan`,label:`Channel`},mcp:{color:`orange`,label:`MCP`},cli:{color:`teal`,label:`CLI`},rpc:{color:`indigo`,label:`RPC`},scheduler:{color:`yellow`,label:`Scheduler`},queue:{color:`pink`,label:`Queue`},trigger:{color:`red`,label:`Trigger`},triggerSource:{color:`grape`,label:`Trigger Source`},agent:{color:`grape`,label:`Agent`}},Yhe={string:{color:`green`,label:`string`},number:{color:`blue`,label:`number`},integer:{color:`blue`,label:`integer`},boolean:{color:`orange`,label:`boolean`},array:{color:`violet`,label:`array`},object:{color:`cyan`,label:`object`},enum:{color:`pink`,label:`enum`}},Xhe={$ref:{color:`blue`,label:`$ref`},$trigger:{color:`green`,label:`$trigger`},$state:{color:`violet`,label:`$state`},$template:{color:`orange`,label:`$template`},$static:{color:`gray`,label:`$static`},$expression:{color:`cyan`,label:`$expression`}},Zhe={auth:{color:`red`,label:`Auth`,icon:Vme},permissioned:{color:`red`,label:`Permissioned`,icon:Nb},exposed:{color:`green`,label:`Exposed`,icon:mb},internal:{color:`gray`,label:`Internal`,icon:Ame},session:{color:`yellow`,label:`Session`,icon:Vme},factory:{color:`violet`,label:`Factory`,icon:jme},factoryCall:{color:`violet`,label:`factory call`},local:{color:`orange`,label:`Local`},required:{color:`red`,label:`required`},sse:{color:`cyan`,label:`SSE`}},Qhe={running:{color:`blue`,label:`running`},completed:{color:`green`,label:`completed`},succeeded:{color:`green`,label:`succeeded`},failed:{color:`red`,label:`failed`},pending:{color:`gray`,label:`pending`},scheduled:{color:`orange`,label:`scheduled`},skipped:{color:`gray`,label:`skipped`},cancelled:{color:`gray`,label:`cancelled`}},$he={route:{variant:`outline`},param:{color:`blue`,variant:`outline`},query:{color:`green`,variant:`outline`},error:{color:`red`,variant:`outline`},schedule:{color:`yellow`,variant:`light`},concurrency:{color:`pink`,variant:`light`,prefix:`concurrency: `},steps:{variant:`outline`,suffix:` step`,pluralSuffix:` steps`},wirings:{color:`gray`,variant:`light`,suffix:` wiring`,pluralSuffix:` wirings`},functions:{variant:`outline`,suffix:` function`,pluralSuffix:` functions`},tag:{variant:`dot`},service:{color:`gray`,variant:`light`,icon:jb},package:{color:`teal`,variant:`light`,icon:xb},exportedName:{color:`gray`,variant:`outline`},nodes:{variant:`light`,suffix:` node`,pluralSuffix:` nodes`},middleware:{color:`orange`,variant:`light`,icon:_b},permission:{color:`red`,variant:`light`,icon:Nb},source:{color:`violet`,variant:`light`},handlers:{color:`cyan`,variant:`outline`,suffix:` handler`,pluralSuffix:` handlers`},actions:{color:`teal`,variant:`outline`,suffix:` action`,pluralSuffix:` actions`},tool:{color:`blue`,variant:`outline`},agent:{color:`grape`,variant:`outline`},agents:{color:`grape`,variant:`outline`,suffix:` agent`,pluralSuffix:` agents`},tools:{color:`blue`,variant:`outline`,suffix:` tool`,pluralSuffix:` tools`},maxSteps:{color:`gray`,variant:`outline`,prefix:`max `,suffix:` step`,pluralSuffix:` steps`},toolChoice:{color:`gray`,variant:`outline`,prefix:`tool: `},storage:{color:`gray`,variant:`outline`,prefix:`storage: `},lastMessages:{color:`gray`,variant:`outline`,prefix:`last `,suffix:` msg`,pluralSuffix:` msgs`},model:{color:`violet`,variant:`light`},format:{color:`gray`,variant:`outline`},wire:{color:`cyan`,variant:`outline`}},ege=e=>Jhe[e]?.color||`gray`,tge=e=>Yhe[e]?.color||`gray`;var Ax={xs:8,sm:10,md:12,lg:14,xl:16},nge={httpMethod:Khe,mcpType:qhe,funcWrapper:kx,wiringType:Jhe,schemaType:Yhe,workflowInputType:Xhe,status:Qhe},jx=e=>e.includes(`/`)?e:e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[_-]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),rge=({icon:e,size:t,color:n})=>(0,j.jsx)(`span`,{style:{color:`var(--mantine-color-${n}-6)`,display:`flex`},children:(0,j.jsx)(e,{size:t})});const Mx=e=>{let{type:t,size:n,...r}=e,i=n||`md`,a=Ax[i]||10;if(t===`label`){let{children:e,color:t,variant:n,...a}=r;return(0,j.jsx)(ky,{size:i,tt:`none`,variant:n||`light`,color:t||`gray`,...a,children:e})}if(t===`flag`){let{flag:e,...t}=r,n=Zhe[e];if(!n)return null;let o=n.icon;return(0,j.jsx)(ky,{size:i,tt:`none`,variant:`light`,color:n.color||`gray`,className:vx.noShrink,leftSection:o?(0,j.jsx)(rge,{icon:o,size:a,color:n.color}):void 0,...t,children:z(n.label)})}if(t===`dynamic`){let{badge:e,value:t,...n}=r,o=$he[e];if(!o)return null;let s=o.icon,c;return c=o.pluralSuffix&&typeof t==`number`?`${t}${t===1&&o.suffix||o.pluralSuffix}`:`${o.prefix||``}${t}${o.suffix||``}`,(0,j.jsx)(ky,{size:i,tt:`none`,variant:`light`,color:o.color||`gray`,className:vx.noShrink,leftSection:s?(0,j.jsx)(rge,{icon:s,size:a,color:o.color||`gray`}):void 0,...n,children:z(jx(c))})}let{value:o,...s}=r,c=nge[t]?.[o],l=c?.label||o;return(0,j.jsx)(ky,{size:i,tt:`none`,variant:`light`,color:c?.color||`gray`,className:vx.noShrink,...s,children:z(jx(l))})};function Nx(e){return typeof e!=`object`||!e||typeof e.lastModified==`number`&&typeof File<`u`&&e instanceof File||typeof e.getMonth==`function`&&typeof Date<`u`&&e instanceof Date?!1:!Array.isArray(e)}function ige(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),Nx(e.additionalItems)}function age(e){if(e===``)return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)?t:e}const Px=`__additional_property`,oge=`allOf`,Fx=`anyOf`,Ix=`const`,sge=`default`,Lx=`__errors`,Rx=`items`,cge=`$name`,zx=`oneOf`,Bx=`properties`,lge=`readonly`,uge=`submitButtonOptions`,Vx=`$ref`,Hx=`root`,dge=[`discriminator`,`propertyName`],Ux=`__rjsf_additionalProperties`,fge=`__rjsf_rootSchema`,Wx=`ui:options`,Gx=`ui:globalOptions`;function Kx(e={},t={}){return e?Object.keys(e).filter(e=>e.indexOf(`ui:`)===0).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&Nx(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&Nx(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function pge(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=Kx(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var mge=typeof global==`object`&&global&&global.Object===Object&&global,hge=typeof self==`object`&&self&&self.Object===Object&&self,qx=mge||hge||Function(`return this`)(),Jx=qx.Symbol,Yx=Object.prototype,V=Yx.hasOwnProperty,Xx=Yx.toString,Zx=Jx?Jx.toStringTag:void 0;function gge(e){var t=V.call(e,Zx),n=e[Zx];try{e[Zx]=void 0;var r=!0}catch{}var i=Xx.call(e);return r&&(t?e[Zx]=n:delete e[Zx]),i}var Qx=gge,$x=Object.prototype.toString;function _ge(e){return $x.call(e)}var vge=_ge,yge=`[object Null]`,bge=`[object Undefined]`,xge=Jx?Jx.toStringTag:void 0;function Sge(e){return e==null?e===void 0?bge:yge:xge&&xge in Object(e)?Qx(e):vge(e)}var eS=Sge;function Cge(e,t){return function(n){return e(t(n))}}var wge=Cge,tS=wge(Object.getPrototypeOf,Object);function Tge(e){return typeof e==`object`&&!!e}var nS=Tge,Ege=`[object Object]`,Dge=Function.prototype,Oge=Object.prototype,kge=Dge.toString,Age=Oge.hasOwnProperty,jge=kge.call(Object);function Mge(e){if(!nS(e)||eS(e)!=Ege)return!1;var t=tS(e);if(t===null)return!0;var n=Age.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&kge.call(n)==jge}var rS=Mge;function iS(e){let t={[Lx]:[],addError(e){this[Lx].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:iS(t)}),t);if(rS(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:iS(n[t])}),t)}return t}function Nge(){this.__data__=[],this.size=0}var Pge=Nge;function aS(e,t){return e===t||e!==e&&t!==t}var oS=aS;function Fge(e,t){for(var n=e.length;n--;)if(oS(e[n][0],t))return n;return-1}var sS=Fge,Ige=Array.prototype.splice;function Lge(e){var t=this.__data__,n=sS(t,e);return n<0?!1:(n==t.length-1?t.pop():Ige.call(t,n,1),--this.size,!0)}var Rge=Lge;function cS(e){var t=this.__data__,n=sS(t,e);return n<0?void 0:t[n][1]}var zge=cS;function Bge(e){return sS(this.__data__,e)>-1}var Vge=Bge;function Hge(e,t){var n=this.__data__,r=sS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var lS=Hge;function uS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uS.prototype.clear=Pge,uS.prototype.delete=Rge,uS.prototype.get=zge,uS.prototype.has=Vge,uS.prototype.set=lS;var dS=uS;function fS(){this.__data__=new dS,this.size=0}var Uge=fS;function Wge(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Gge=Wge;function Kge(e){return this.__data__.get(e)}var qge=Kge;function Jge(e){return this.__data__.has(e)}var pS=Jge;function Yge(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var mS=Yge,Xge=`[object AsyncFunction]`,Zge=`[object Function]`,hS=`[object GeneratorFunction]`,Qge=`[object Proxy]`;function gS(e){if(!mS(e))return!1;var t=eS(e);return t==Zge||t==hS||t==Xge||t==Qge}var _S=gS,$ge=qx[`__core-js_shared__`],e_e=function(){var e=/[^.]+$/.exec($ge&&$ge.keys&&$ge.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function t_e(e){return!!e_e&&e_e in e}var n_e=t_e,r_e=Function.prototype.toString;function i_e(e){if(e!=null){try{return r_e.call(e)}catch{}try{return e+``}catch{}}return``}var vS=i_e,a_e=/[\\^$.*+?()[\]{}|]/g,o_e=/^\[object .+?Constructor\]$/,s_e=Function.prototype,c_e=Object.prototype,l_e=s_e.toString,u_e=c_e.hasOwnProperty,d_e=RegExp(`^`+l_e.call(u_e).replace(a_e,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function f_e(e){return!mS(e)||n_e(e)?!1:(_S(e)?d_e:o_e).test(vS(e))}var p_e=f_e;function yS(e,t){return e?.[t]}var bS=yS;function xS(e,t){var n=bS(e,t);return p_e(n)?n:void 0}var SS=xS,CS=SS(qx,`Map`),wS=SS(Object,`create`);function m_e(){this.__data__=wS?wS(null):{},this.size=0}var TS=m_e;function ES(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var h_e=ES,g_e=`__lodash_hash_undefined__`,__e=Object.prototype.hasOwnProperty;function v_e(e){var t=this.__data__;if(wS){var n=t[e];return n===g_e?void 0:n}return __e.call(t,e)?t[e]:void 0}var y_e=v_e,b_e=Object.prototype.hasOwnProperty;function DS(e){var t=this.__data__;return wS?t[e]!==void 0:b_e.call(t,e)}var x_e=DS,S_e=`__lodash_hash_undefined__`;function C_e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=wS&&t===void 0?S_e:t,this}var w_e=C_e;function OS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}OS.prototype.clear=TS,OS.prototype.delete=h_e,OS.prototype.get=y_e,OS.prototype.has=x_e,OS.prototype.set=w_e;var T_e=OS;function E_e(){this.size=0,this.__data__={hash:new T_e,map:new(CS||dS),string:new T_e}}var D_e=E_e;function O_e(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var kS=O_e;function k_e(e,t){var n=e.__data__;return kS(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var AS=k_e;function A_e(e){var t=AS(this,e).delete(e);return this.size-=t?1:0,t}var j_e=A_e;function M_e(e){return AS(this,e).get(e)}var N_e=M_e;function P_e(e){return AS(this,e).has(e)}var F_e=P_e;function I_e(e,t){var n=AS(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var L_e=I_e;function jS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}jS.prototype.clear=D_e,jS.prototype.delete=j_e,jS.prototype.get=N_e,jS.prototype.has=F_e,jS.prototype.set=L_e;var R_e=jS,z_e=200;function B_e(e,t){var n=this.__data__;if(n instanceof dS){var r=n.__data__;if(!CS||r.length<z_e-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new R_e(r)}return n.set(e,t),this.size=n.size,this}var V_e=B_e;function MS(e){this.size=(this.__data__=new dS(e)).size}MS.prototype.clear=Uge,MS.prototype.delete=Gge,MS.prototype.get=qge,MS.prototype.has=pS,MS.prototype.set=V_e;var NS=MS,H_e=`__lodash_hash_undefined__`;function U_e(e){return this.__data__.set(e,H_e),this}var W_e=U_e;function PS(e){return this.__data__.has(e)}var G_e=PS;function K_e(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new R_e;++t<n;)this.add(e[t])}K_e.prototype.add=K_e.prototype.push=W_e,K_e.prototype.has=G_e;var q_e=K_e;function J_e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Y_e=J_e;function X_e(e,t){return e.has(t)}var FS=X_e,Z_e=1,Q_e=2;function $_e(e,t,n,r,i,a){var o=n&Z_e,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Q_e?new q_e:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Y_e(t,function(e,t){if(!FS(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var eve=$_e,IS=qx.Uint8Array;function LS(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var tve=LS;function nve(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var RS=nve,rve=1,zS=2,ive=`[object Boolean]`,ave=`[object Date]`,ove=`[object Error]`,sve=`[object Map]`,cve=`[object Number]`,lve=`[object RegExp]`,uve=`[object Set]`,dve=`[object String]`,fve=`[object Symbol]`,pve=`[object ArrayBuffer]`,mve=`[object DataView]`,hve=Jx?Jx.prototype:void 0,BS=hve?hve.valueOf:void 0;function gve(e,t,n,r,i,a,o){switch(n){case mve:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pve:return!(e.byteLength!=t.byteLength||!a(new IS(e),new IS(t)));case ive:case ave:case cve:return oS(+e,+t);case ove:return e.name==t.name&&e.message==t.message;case lve:case dve:return e==t+``;case sve:var s=tve;case uve:var c=r&rve;if(s||=RS,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=zS,o.set(e,t);var u=eve(s(e),s(t),r,i,a,o);return o.delete(e),u;case fve:if(BS)return BS.call(e)==BS.call(t)}return!1}var VS=gve;function _ve(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var vve=_ve,HS=Array.isArray;function yve(e,t,n){var r=t(e);return HS(e)?r:vve(r,n(e))}var bve=yve;function xve(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var Sve=xve;function US(){return[]}var WS=US,Cve=Object.prototype.propertyIsEnumerable,wve=Object.getOwnPropertySymbols,GS=wve?function(e){return e==null?[]:(e=Object(e),Sve(wve(e),function(t){return Cve.call(e,t)}))}:WS;function Tve(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Eve=Tve,Dve=`[object Arguments]`;function Ove(e){return nS(e)&&eS(e)==Dve}var kve=Ove,Ave=Object.prototype,jve=Ave.hasOwnProperty,Mve=Ave.propertyIsEnumerable,KS=kve(function(){return arguments}())?kve:function(e){return nS(e)&&jve.call(e,`callee`)&&!Mve.call(e,`callee`)};function Nve(){return!1}var Pve=Nve,Fve=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Ive=Fve&&typeof module==`object`&&module&&!module.nodeType&&module,Lve=Ive&&Ive.exports===Fve?qx.Buffer:void 0,qS=(Lve?Lve.isBuffer:void 0)||Pve,Rve=9007199254740991,zve=/^(?:0|[1-9]\d*)$/;function Bve(e,t){var n=typeof e;return t??=Rve,!!t&&(n==`number`||n!=`symbol`&&zve.test(e))&&e>-1&&e%1==0&&e<t}var Vve=Bve,Hve=9007199254740991;function Uve(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Hve}var Wve=Uve,Gve=`[object Arguments]`,Kve=`[object Array]`,qve=`[object Boolean]`,Jve=`[object Date]`,Yve=`[object Error]`,Xve=`[object Function]`,Zve=`[object Map]`,Qve=`[object Number]`,$ve=`[object Object]`,eye=`[object RegExp]`,tye=`[object Set]`,nye=`[object String]`,rye=`[object WeakMap]`,iye=`[object ArrayBuffer]`,aye=`[object DataView]`,oye=`[object Float32Array]`,sye=`[object Float64Array]`,cye=`[object Int8Array]`,lye=`[object Int16Array]`,uye=`[object Int32Array]`,dye=`[object Uint8Array]`,fye=`[object Uint8ClampedArray]`,pye=`[object Uint16Array]`,mye=`[object Uint32Array]`,JS={};JS[oye]=JS[sye]=JS[cye]=JS[lye]=JS[uye]=JS[dye]=JS[fye]=JS[pye]=JS[mye]=!0,JS[Gve]=JS[Kve]=JS[iye]=JS[qve]=JS[aye]=JS[Jve]=JS[Yve]=JS[Xve]=JS[Zve]=JS[Qve]=JS[$ve]=JS[eye]=JS[tye]=JS[nye]=JS[rye]=!1;function hye(e){return nS(e)&&Wve(e.length)&&!!JS[eS(e)]}var gye=hye;function _ye(e){return function(t){return e(t)}}var YS=_ye,vye=typeof exports==`object`&&exports&&!exports.nodeType&&exports,XS=vye&&typeof module==`object`&&module&&!module.nodeType&&module,yye=XS&&XS.exports===vye&&mge.process,ZS=function(){try{return XS&&XS.require&&XS.require(`util`).types||yye&&yye.binding&&yye.binding(`util`)}catch{}}(),bye=ZS&&ZS.isTypedArray,QS=bye?YS(bye):gye,xye=Object.prototype.hasOwnProperty;function Sye(e,t){var n=HS(e),r=!n&&KS(e),i=!n&&!r&&qS(e),a=!n&&!r&&!i&&QS(e),o=n||r||i||a,s=o?Eve(e.length,String):[],c=s.length;for(var l in e)(t||xye.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Vve(l,c)))&&s.push(l);return s}var Cye=Sye,wye=Object.prototype;function Tye(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||wye)}var Eye=Tye,Dye=wge(Object.keys,Object),Oye=Object.prototype.hasOwnProperty;function kye(e){if(!Eye(e))return Dye(e);var t=[];for(var n in Object(e))Oye.call(e,n)&&n!=`constructor`&&t.push(n);return t}var Aye=kye;function $S(e){return e!=null&&Wve(e.length)&&!_S(e)}var eC=$S;function tC(e){return eC(e)?Cye(e):Aye(e)}var nC=tC;function jye(e){return bve(e,nC,GS)}var Mye=jye,Nye=1,Pye=Object.prototype.hasOwnProperty;function Fye(e,t,n,r,i,a){var o=n&Nye,s=Mye(e),c=s.length;if(c!=Mye(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Pye.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Iye=Fye,Lye=SS(qx,`DataView`),Rye=SS(qx,`Promise`),rC=SS(qx,`Set`),zye=SS(qx,`WeakMap`),Bye=`[object Map]`,Vye=`[object Object]`,Hye=`[object Promise]`,Uye=`[object Set]`,Wye=`[object WeakMap]`,Gye=`[object DataView]`,Kye=vS(Lye),qye=vS(CS),Jye=vS(Rye),Yye=vS(rC),Xye=vS(zye),iC=eS;(Lye&&iC(new Lye(new ArrayBuffer(1)))!=Gye||CS&&iC(new CS)!=Bye||Rye&&iC(Rye.resolve())!=Hye||rC&&iC(new rC)!=Uye||zye&&iC(new zye)!=Wye)&&(iC=function(e){var t=eS(e),n=t==Vye?e.constructor:void 0,r=n?vS(n):``;if(r)switch(r){case Kye:return Gye;case qye:return Bye;case Jye:return Hye;case Yye:return Uye;case Xye:return Wye}return t});var aC=iC,Zye=1,Qye=`[object Arguments]`,$ye=`[object Array]`,ebe=`[object Object]`,tbe=Object.prototype.hasOwnProperty;function nbe(e,t,n,r,i,a){var o=HS(e),s=HS(t),c=o?$ye:aC(e),l=s?$ye:aC(t);c=c==Qye?ebe:c,l=l==Qye?ebe:l;var u=c==ebe,d=l==ebe,f=c==l;if(f&&qS(e)){if(!qS(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new NS,o||QS(e)?eve(e,t,n,r,i,a):VS(e,t,c,n,r,i,a);if(!(n&Zye)){var p=u&&tbe.call(e,`__wrapped__`),m=d&&tbe.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new NS,i(h,g,n,r,a)}}return f?(a||=new NS,Iye(e,t,n,r,i,a)):!1}var rbe=nbe;function ibe(e,t,n,r,i){return e===t?!0:e==null||t==null||!nS(e)&&!nS(t)?e!==e&&t!==t:rbe(e,t,n,r,ibe,i)}var abe=ibe;function obe(e,t,n){n=typeof n==`function`?n:void 0;var r=n?n(e,t):void 0;return r===void 0?abe(e,t,void 0,n):!!r}var sbe=obe;function oC(e,t){return sbe(e,t,(e,t)=>{if(typeof e==`function`&&typeof t==`function`)return!0})}var cbe=`[object Symbol]`;function lbe(e){return typeof e==`symbol`||nS(e)&&eS(e)==cbe}var sC=lbe,ube=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dbe=/^\w*$/;function fbe(e,t){if(HS(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||sC(e)?!0:dbe.test(e)||!ube.test(e)||t!=null&&e in Object(t)}var cC=fbe,lC=`Expected a function`;function pbe(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(lC);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(pbe.Cache||R_e),n}pbe.Cache=R_e;var mbe=pbe,hbe=500;function gbe(e){var t=mbe(e,function(e){return n.size===hbe&&n.clear(),e}),n=t.cache;return t}var _be=gbe,vbe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ybe=/\\(\\)?/g,bbe=_be(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(vbe,function(e,n,r,i){t.push(r?i.replace(ybe,`$1`):n||e)}),t});function xbe(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var uC=xbe,dC=1/0,Sbe=Jx?Jx.prototype:void 0,fC=Sbe?Sbe.toString:void 0;function Cbe(e){if(typeof e==`string`)return e;if(HS(e))return uC(e,Cbe)+``;if(sC(e))return fC?fC.call(e):``;var t=e+``;return t==`0`&&1/e==-dC?`-0`:t}var wbe=Cbe;function Tbe(e){return e==null?``:wbe(e)}var pC=Tbe;function Ebe(e,t){return HS(e)?e:cC(e,t)?[e]:bbe(pC(e))}var mC=Ebe,Dbe=1/0;function Obe(e){if(typeof e==`string`||sC(e))return e;var t=e+``;return t==`0`&&1/e==-Dbe?`-0`:t}var hC=Obe;function gC(e,t){t=mC(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[hC(t[n++])];return n&&n==r?e:void 0}var kbe=gC;function Abe(e,t,n){var r=e==null?void 0:kbe(e,t);return r===void 0?n:r}var _C=Abe,jbe=Object.prototype.hasOwnProperty;function Mbe(e,t){return e!=null&&jbe.call(e,t)}var Nbe=Mbe;function Pbe(e,t,n){t=mC(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=hC(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Wve(i)&&Vve(o,i)&&(HS(e)||KS(e)))}var Fbe=Pbe;function Ibe(e,t){return e!=null&&Fbe(e,t,Nbe)}var vC=Ibe;function Lbe(e,t){return abe(e,t)}var yC=Lbe,Rbe=function(){try{var e=SS(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function zbe(e,t,n){t==`__proto__`&&Rbe?Rbe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var bC=zbe,xC=Object.prototype.hasOwnProperty;function Bbe(e,t,n){var r=e[t];(!(xC.call(e,t)&&oS(r,n))||n===void 0&&!(t in e))&&bC(e,t,n)}var H=Bbe;function SC(e,t,n,r){if(!mS(e))return e;t=mC(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=hC(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=mS(u)?u:Vve(t[i+1])?[]:{})}H(s,c,l),s=s[c]}return e}var CC=SC;function Vbe(e,t,n){return e==null?e:CC(e,t,n)}var wC=Vbe;function Hbe(e){return e}var Ube=Hbe;function Wbe(e){return typeof e==`function`?e:Ube}var Gbe=Wbe,Kbe=/\s/;function qbe(e){for(var t=e.length;t--&&Kbe.test(e.charAt(t)););return t}var Jbe=qbe,Ybe=/^\s+/;function TC(e){return e&&e.slice(0,Jbe(e)+1).replace(Ybe,``)}var Xbe=TC,Zbe=NaN,EC=/^[-+]0x[0-9a-f]+$/i,Qbe=/^0b[01]+$/i,DC=/^0o[0-7]+$/i,$be=parseInt;function exe(e){if(typeof e==`number`)return e;if(sC(e))return Zbe;if(mS(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=mS(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Xbe(e);var n=Qbe.test(e);return n||DC.test(e)?$be(e.slice(2),n?2:8):EC.test(e)?Zbe:+e}var OC=exe,txe=1/0,nxe=17976931348623157e292;function rxe(e){return e?(e=OC(e),e===txe||e===-txe?(e<0?-1:1)*nxe:e===e?e:0):e===0?e:0}var ixe=rxe;function axe(e){var t=ixe(e),n=t%1;return t===t?n?t-n:t:0}var oxe=axe,sxe=9007199254740991,kC=4294967295,cxe=Math.min;function lxe(e,t){if(e=oxe(e),e<1||e>sxe)return[];var n=kC,r=cxe(e,kC);t=Gbe(t),e-=kC;for(var i=Eve(r,t);++n<e;)t(n);return i}var uxe=lxe;function AC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var jC=AC,MC=Object.create,NC=function(){function e(){}return function(t){if(!mS(t))return{};if(MC)return MC(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function PC(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var dxe=PC();function fxe(e,t){return e&&dxe(e,t,nC)}var pxe=fxe,mxe=1,FC=2;function hxe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new NS;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?abe(u,l,mxe|FC,r,d):f))return!1}}return!0}var gxe=hxe;function IC(e){return e===e&&!mS(e)}var _xe=IC;function vxe(e){for(var t=nC(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,_xe(i)]}return t}var yxe=vxe;function bxe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var LC=bxe;function xxe(e){var t=yxe(e);return t.length==1&&t[0][2]?LC(t[0][0],t[0][1]):function(n){return n===e||gxe(n,e,t)}}var Sxe=xxe;function Cxe(e,t){return e!=null&&t in Object(e)}var wxe=Cxe;function Txe(e,t){return e!=null&&Fbe(e,t,wxe)}var Exe=Txe,Dxe=1,Oxe=2;function kxe(e,t){return cC(e)&&_xe(t)?LC(hC(e),t):function(n){var r=_C(n,e);return r===void 0&&r===t?Exe(n,e):abe(t,r,Dxe|Oxe)}}var Axe=kxe;function jxe(e){return function(t){return t?.[e]}}var Mxe=jxe;function Nxe(e){return function(t){return kbe(t,e)}}var RC=Nxe;function Pxe(e){return cC(e)?Mxe(hC(e)):RC(e)}var Fxe=Pxe;function Ixe(e){return typeof e==`function`?e:e==null?Ube:typeof e==`object`?HS(e)?Axe(e[0],e[1]):Sxe(e):Fxe(e)}var Lxe=Ixe;function Rxe(e,t,n){var r=HS(e),i=r||qS(e)||QS(e);if(t=Lxe(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:mS(e)&&_S(a)?NC(tS(e)):{}}return(i?jC:pxe)(e,function(e,r,i){return t(n,e,r,i)}),n}var zC=Rxe;function zxe(e,t,n){(n!==void 0&&!oS(e[t],n)||n===void 0&&!(t in e))&&bC(e,t,n)}var BC=zxe,VC=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Bxe=VC&&typeof module==`object`&&module&&!module.nodeType&&module,HC=Bxe&&Bxe.exports===VC?qx.Buffer:void 0,Vxe=HC?HC.allocUnsafe:void 0;function Hxe(e,t){if(t)return e.slice();var n=e.length,r=Vxe?Vxe(n):new e.constructor(n);return e.copy(r),r}var UC=Hxe;function Uxe(e){var t=new e.constructor(e.byteLength);return new IS(t).set(new IS(e)),t}var WC=Uxe;function Wxe(e,t){var n=t?WC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Gxe=Wxe;function Kxe(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var qxe=Kxe;function Jxe(e){return typeof e.constructor==`function`&&!Eye(e)?NC(tS(e)):{}}var Yxe=Jxe;function Xxe(e){return nS(e)&&eC(e)}var GC=Xxe;function Zxe(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var KC=Zxe;function qC(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?bC(n,s,c):H(n,s,c)}return n}var JC=qC;function Qxe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var $xe=Qxe,eSe=Object.prototype.hasOwnProperty;function tSe(e){if(!mS(e))return $xe(e);var t=Eye(e),n=[];for(var r in e)r==`constructor`&&(t||!eSe.call(e,r))||n.push(r);return n}var nSe=tSe;function rSe(e){return eC(e)?Cye(e,!0):nSe(e)}var YC=rSe;function iSe(e){return JC(e,YC(e))}var aSe=iSe;function oSe(e,t,n,r,i,a,o){var s=KC(e,n),c=KC(t,n),l=o.get(c);if(l){BC(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=HS(c),p=!f&&qS(c),m=!f&&!p&&QS(c);u=c,f||p||m?HS(s)?u=s:GC(s)?u=qxe(s):p?(d=!1,u=UC(c,!0)):m?(d=!1,u=Gxe(c,!0)):u=[]:rS(c)||KS(c)?(u=s,KS(s)?u=aSe(s):(!mS(s)||_S(s))&&(u=Yxe(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),BC(e,n,u)}var sSe=oSe;function cSe(e,t,n,r,i){e!==t&&dxe(t,function(a,o){if(i||=new NS,mS(a))sSe(e,t,o,n,cSe,r,i);else{var s=r?r(KC(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),BC(e,o,s)}},YC)}var XC=cSe;function ZC(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var QC=ZC,lSe=Math.max;function uSe(e,t,n){return t=lSe(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=lSe(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),QC(e,this,s)}}var $C=uSe;function ew(e){return function(){return e}}var tw=ew,dSe=Rbe?function(e,t){return Rbe(e,`toString`,{configurable:!0,enumerable:!1,value:tw(t),writable:!0})}:Ube,fSe=800,pSe=16,mSe=Date.now;function nw(e){var t=0,n=0;return function(){var r=mSe(),i=pSe-(r-n);if(n=r,i>0){if(++t>=fSe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var rw=nw(dSe);function iw(e,t){return rw($C(e,t,Ube),e+``)}var aw=iw;function hSe(e,t,n){if(!mS(n))return!1;var r=typeof t;return(r==`number`?eC(n)&&Vve(t,n.length):r==`string`&&t in n)?oS(n[t],e):!1}var gSe=hSe;function _Se(e){return aw(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&gSe(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var ow=_Se(function(e,t,n){XC(e,t,n)}),sw=Jx?Jx.isConcatSpreadable:void 0;function vSe(e){return HS(e)||KS(e)||!!(sw&&e&&e[sw])}var cw=vSe;function ySe(e,t,n,r,i){var a=-1,o=e.length;for(n||=cw,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?ySe(s,t-1,n,r,i):vve(i,s):r||(i[i.length]=s)}return i}var lw=ySe,bSe=1/0;function uw(e){return e!=null&&e.length?lw(e,bSe):[]}var dw=uw;function xSe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var SSe=xSe;function CSe(e){return e!==e}var wSe=CSe;function TSe(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var ESe=TSe;function DSe(e,t,n){return t===t?ESe(e,t,n):SSe(e,wSe,n)}var fw=DSe;function pw(e,t){return!!(e!=null&&e.length)&&fw(e,t,0)>-1}var mw=pw;function OSe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var kSe=OSe;function ASe(){}var hw=ASe,gw=rC&&1/RS(new rC([,-0]))[1]==1/0?function(e){return new rC(e)}:hw,_w=200;function jSe(e,t,n){var r=-1,i=mw,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=kSe;else if(a>=_w){var l=t?null:gw(e);if(l)return RS(l);o=!1,i=FS,c=new q_e}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var MSe=jSe;function NSe(e){return e&&e.length?MSe(e):[]}var PSe=NSe,FSe=`[object Map]`,ISe=`[object Set]`,LSe=Object.prototype.hasOwnProperty;function RSe(e){if(e==null)return!0;if(eC(e)&&(HS(e)||typeof e==`string`||typeof e.splice==`function`||qS(e)||QS(e)||KS(e)))return!e.length;var t=aC(e);if(t==FSe||t==ISe)return!e.size;if(Eye(e))return!Aye(e).length;for(var n in e)if(LSe.call(e,n))return!1;return!0}var vw=RSe,zSe=Object.prototype;function yw(e){for(let t in e)if(zSe.hasOwnProperty.call(e,t))return!1;return!0}const BSe=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`],VSe=[`items`,`allOf`,`oneOf`,`anyOf`],bw=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];[...BSe,...VSe,...bw];function xw(e){return typeof e==`object`}function Sw(e){return xw(e)?yw(e):e===!0}function Cw(e,t){return e<t?-1:e>t?1:0}function HSe(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){let i=e;e=t,t=i,r=n}let i=new Set(e);for(let e=0;e<r;e++)i.add(t[e]);return Array.from(i)}function USe(e,t){let n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){let n=e;e=t,t=n}let r=new Set(t);for(let t=0;t<e.length&&r.size>0;t++){let i=e[t];r.delete(i)&&n.push(i)}return n}function ww(e){return e.length===0}function WSe(e){return(t,n)=>{let r=t.length-n.length;if(r!==0)return r;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){let i=e(t[r],n[r]);if(i!==0)return i}return 0}}function GSe(e,{threshold:t=12}={}){return n=>{let r=n.length;if(r===0)return n;if(r<=t){let t=[],i=0;outer:for(let a=0;a<r;a++){let r=n[a];for(let n=0;n<i;n++)if(e(r,t[n])===0)continue outer;i=t.push(r)}return t}let i=n.slice().sort(e),a=0;for(let t=1;t<r;t++)e(i[a],i[t])!==0&&++a!==t&&(i[a]=i[t]);return i.length=a+1,i}}function KSe(e){return(t,n)=>{let r=[],i=t.length,a=n.length;if(i===0||a===0)return r;if(i>a){let e=t;t=n,n=e;let r=i;i=a,a=r}let o=[...t].sort(e),s=[...n].sort(e),c=0,l=0;for(;c<i&&l<a;){let t=e(o[c],s[l]);t===0?((r.length===0||e(r[r.length-1],o[c])!==0)&&r.push(o[c]),c++,l++):t<0?c++:l++}return r}}function Tw(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}const Ew=Tw;var Dw=()=>0,Ow=e=>e===void 0,kw=e=>typeof e!=`object`,Aw={boolean:0,number:1,string:2};function qSe(e,t){let n=typeof e,r=typeof t;return n===r?Cw(e,t):Aw[n]-Aw[r]}function JSe(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(r>n){let n=e;e=t,t=n}let i=new Set(e),a=t.length;for(let n=0;n<a;n++){let r=t[n];i.has(r)||e.push(r)}return e}function jw(e,t,n=Dw){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function Mw(e){return jw(Ow,e)}function Nw(e,t){return jw(t=>t===void 0||e(t),t)}function YSe(e,t){return jw(Array.isArray,e,t)}var Pw=Mw(Cw),Fw=Nw(e=>e===0,(e,t)=>e-t);function XSe({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=Ew(t,e=>Object.keys(e).sort());function r(e){return(t,r)=>{let i=n(t),a=n(r),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=Cw(i[e],a[e]);if(t!==0)return t}if(i.length!==a.length)return i.length-a.length;for(let n=0;n<o;n++){let a=i[n],o=e(t[a],r[a]);if(o!==0)return o}return 0}}function i(t){let n=WSe(t),r=Ew(e,GSe(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(Cw);function o(e,t){if(xw(e)){if(xw(t)){let n=JSe(Object.keys(e),Object.keys(t)),r=n.length;for(let i=0;i<r;i++){let r=n[i];if(e[r]===t[r])continue;let a=(m[r]??s)(e[r],t[r]);if(a!==0)return a}return 0}return t===!0&&yw(e)?0:1}return xw(t)?e===!0&&yw(t)?0:-1:Cw(e,t)}let s=Mw(l),c=jw(kw,YSe(r(s),WSe(l)),qSe);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=Mw(o),d=Nw(yw,r(u)),f=Mw(i(o)),p=Nw(Sw,o),m={$id:Pw,$comment:Pw,$defs:d,$ref:Pw,$schema:Pw,const:s,contains:u,contentEncoding:Pw,contentMediaType:Pw,default:s,definitions:d,description:Pw,else:u,examples:s,exclusiveMaximum:Pw,exclusiveMinimum:Pw,format:Pw,if:u,maximum:Pw,maxItems:Pw,maxLength:Pw,maxProperties:Pw,minimum:Pw,multipleOf:Pw,not:u,pattern:Pw,propertyNames:u,readOnly:Pw,then:u,title:Pw,writeOnly:Pw,uniqueItems:Nw(e=>e===!1,Dw),minLength:Fw,minItems:Fw,minProperties:Fw,required:Nw(ww,a),enum:Nw(ww,i(l)),type:Mw((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?Cw(e,t):a(n?e:[e],r?t:[t])}),items:Nw(e=>!Array.isArray(e)&&Sw(e),YSe(o,WSe(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:Nw(yw,r(Mw(YSe(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function ZSe(e){return e}const Iw=(e,t)=>e?Iw(t%e,e):t,Lw=(e,t)=>Math.abs(e*t)/Iw(e,t);function Rw(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*zw(e,t,n){let r=e.length,i=t.length;if(r>0&&i>0)for(let a=0;a<r;a++){let r=e[a];for(let e=0;e<i;e++)yield n(r,t[e])}}function Bw(e,t){return e||t}function QSe(e){return(t,n)=>{let r={...t},i=Object.keys(n),a=i.length;for(let o=0;o<a;o++){let a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function $Se(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function Vw(e,t,n){n===void 0||Sw(n)?delete e[t]:e[t]=n}var eCe=[`properties`,`patternProperties`,`additionalProperties`];function tCe(e){let t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){let n=t[i];r.push({regExp:new RegExp(n),schema:e[n]})}return[r,t]}var nCe=[[],[]];function rCe(e,t,n){let r=n.length;for(let i=0;i<r;i++){let r=n[i];if(!r.regExp.test(t))continue;let a=r.schema;if(a===!1)return!0;e.push(a)}return!1}var Hw=[`items`,`additionalItems`],iCe=[`if`,`then`,`else`];function aCe(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function oCe(e,t){if(e===t)return e;switch(e){case`number`:if(t===`integer`)return`integer`;case`integer`:if(t===`number`)return`integer`;default:return}}function Uw(e,t,n){return[e,t,n]}function sCe(e){let t=new Map;for(let[n,r,i]of e){let e=e=>{if(!i(e))throw Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(e[n])}, ${r}: ${JSON.stringify(e[r])})`)};for(let i of[[n,r],[r,n]]){let n=t.get(i[0]);n===void 0&&(n=[],t.set(i[0],n)),n.push({oppositeKey:i[1],check:e})}}return t}const cCe=[Uw(`minimum`,`maximum`,e=>e.maximum>=e.minimum),Uw(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),Uw(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),Uw(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),Uw(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),Uw(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),Uw(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function lCe({mergePatterns:e=Rw,isSubRegExp:t=Object.is,intersectJson:n=USe,deduplicateJsonSchemaDef:r=ZSe,defaultMerger:i=ZSe,assigners:a=[],checks:o=cCe,mergers:s}={}){function c(e){let t=e.length,n=e[0];for(let r=1;r<t;r++){let t=_(n,e[r]);if(t===!1)return!1;Sw(t)||(n=t)}return n}function l(e,t,n,r,i,a,o){if(e.length=0,n===!1)return!1;if(e.push(n),i!==void 0){if(i===!1)return!1;e.push(i)}if(rCe(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(rCe(e,t,r))return!1}else s&&o!==void 0&&e.push(o);return e.length===1?e[0]:c(e)}function u(e,t,n,r,i,a){let o=n.length;if(o>0&&i!==!1)if(a)Object.assign(e,t);else for(let a=0;a<o;a++){let o=n[a];r.has(o)||(e[o]=_(t[o],i))}return e}let d=(n,{properties:r={},patternProperties:i,additionalProperties:a=!0},{properties:o={},patternProperties:s,additionalProperties:c=!0})=>{let d=Sw(a),f=Sw(c);if(d&&f)return Vw(n,`properties`,v(r,o)),Vw(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;Vw(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?tCe(i):nCe,[b,x]=s?tCe(s):nCe,S=[],C=new Set,w=f?void 0:c;for(let e=0;e<h;e++){let t=m[e];C.add(t);let n=l(S,t,r[t],g,o[t],b,w);n!==void 0&&(p[t]=n)}let T=Object.keys(o),E=T.length,D=d?void 0:a;for(let e=0;e<E;e++){let t=T[e];if(C.has(t))continue;let n=l(S,t,o[t],b,void 0,g,D);n!==void 0&&(p[t]=n)}Vw(n,`properties`,p);let O={},k=new Set;if(y.length>0&&x.length>0){let n=zw(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])});for(;!n.next().done;);}return O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),Vw(n,`patternProperties`,O),n},f=(e,{items:t=[],additionalItems:n},{items:r=[],additionalItems:i})=>{let a=Array.isArray(t),o=Array.isArray(r),s=[];if(e.items=s,a&&o){let[a,o,c]=t.length<r.length?[t.length,n,r]:[r.length,i,t],l=0;for(;l<a;l++)s.push(_(t[l],r[l]));if(o===!1)e.additionalItems=!1;else{let t=o===void 0||Sw(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));Vw(e,`additionalItems`,n!==void 0&&i!==void 0?_(n,i):n??i)}}else if(a||o){let[o,c,l]=a?[t,r,n]:[r,t,i];Vw(e,`additionalItems`,l&&_(l,c));for(let e=0;e<o.length;e++)s.push(_(o[e],c))}else delete e.additionalItems,e.items=_(t,r);return e},p=(e,t,n)=>{aCe(e,t);let r=aCe({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){return r(Array.from(zw(e,t,_)))}let h=$Se([[eCe,d],[Hw,f],[iCe,p],...a]),g=sCe(o);function _(e,t){if(e===!1||t===!1)return!1;if(Sw(e))return Sw(t)?!0:t;if(Sw(t))return e;let n={...e},r=new Set,a=new Set,o=Object.keys(t),s=o.length;for(let c=0;c<s;c++){let s=o[c],l=t[s];if(l===void 0)continue;let u=g.get(s);if(u!==void 0){let t=u.length;for(let n=0;n<t;n++){let t=u[n];e[t.oppositeKey]!==void 0&&a.add(t.check)}}let d=e[s];if(d===void 0){n[s]=l;continue}let f=h.get(s);if(f){r.add(f);continue}let p=y[s]??i;n[s]=p(d,l)}for(let i of r)n=i(n,e,t);for(let e of a)e(n);return n}let v=QSe(_),y={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(e,t)=>{if(e===t)return e;let n=Array.isArray(e),r=Array.isArray(t);if(!n&&!r){let n=oCe(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)for(let n of zw(e,t,oCe))n!==void 0&&i.add(n);else{let r=n?e:t,a=n?t:e,o=r.length;for(let e=0;e<o;e++){let t=oCe(a,r[e]);t!==void 0&&i.add(t)}}let a=i.size;if(a===1)return i.values().next().value;if(a>1)return Array.from(i)}throw Error(`It is not possible to create an intersection of the following incompatible types: ${e.toString()}, ${t.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(e,t)=>{let n=r([e,t]);return n.length===1?n[0]:{anyOf:n}},pattern:e,readOnly:Bw,writeOnly:Bw,enum:(e,t)=>{let r=n(e,t);if(r.length===0)throw Error(`Intersection of the following enums is empty: "${JSON.stringify(e)}", "${JSON.stringify(t)}"`);return r},anyOf:m,oneOf:m,allOf:(e,t)=>r(e.concat(t)),propertyNames:_,contains:_,dependencies:QSe((e,t)=>Array.isArray(e)?Array.isArray(t)?HSe(e,t):_(t,{required:e}):Array.isArray(t)?_(e,{required:t}):_(e,t)),examples:(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))throw Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return HSe(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return Lw(e,t)/n},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:Bw,required:HSe,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function Ww(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(typeof e==`boolean`||e.allOf===void 0){t.push(e);continue}let{allOf:r,...i}=e;t.push(i);for(let e=r.length-1;e>=0;e--)n.push(r[e])}return t}function Gw(e){return t=>e(Ww(t))}var Kw=d(s((e=>{var t=/~/,n=/~[01]/g;function r(e){switch(e){case`~1`:return`/`;case`~0`:return`~`}throw Error(`Invalid tilde escape: `+e)}function i(e){return t.test(e)?e.replace(n,r):e}function a(e){if(typeof e==`string`){if(e=e.split(`/`),e[0]===``)return e;throw Error(`Invalid JSON pointer.`)}else if(Array.isArray(e)){for(let t of e)if(typeof t!=`string`&&typeof t!=`number`)throw Error(`Invalid JSON pointer. Must be of type string or number.`);return e}throw Error(`Invalid JSON pointer.`)}function o(e,t){if(typeof e!=`object`)throw Error(`Invalid input object.`);t=a(t);var n=t.length;if(n===1)return e;for(var r=1;r<n;){if(e=e[i(t[r++])],n===r)return e;if(typeof e!=`object`||!e)return}}e.get=o}))(),1);function qw(e,t){return e&&JC(t,nC(t),e)}var uCe=qw;function dCe(e,t){return e&&JC(t,YC(t),e)}var fCe=dCe;function pCe(e,t){return JC(e,GS(e),t)}var mCe=pCe,hCe=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)vve(t,GS(e)),e=tS(e);return t}:WS;function gCe(e,t){return JC(e,hCe(e),t)}var Jw=gCe;function _Ce(e){return bve(e,YC,hCe)}var Yw=_Ce,Xw=Object.prototype.hasOwnProperty;function Zw(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Xw.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var vCe=Zw;function yCe(e,t){var n=t?WC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Qw=yCe,bCe=/\w*$/;function xCe(e){var t=new e.constructor(e.source,bCe.exec(e));return t.lastIndex=e.lastIndex,t}var $w=xCe,eT=Jx?Jx.prototype:void 0,SCe=eT?eT.valueOf:void 0;function tT(e){return SCe?Object(SCe.call(e)):{}}var CCe=tT,nT=`[object Boolean]`,rT=`[object Date]`,iT=`[object Map]`,wCe=`[object Number]`,TCe=`[object RegExp]`,aT=`[object Set]`,ECe=`[object String]`,U=`[object Symbol]`,DCe=`[object ArrayBuffer]`,OCe=`[object DataView]`,kCe=`[object Float32Array]`,oT=`[object Float64Array]`,ACe=`[object Int8Array]`,sT=`[object Int16Array]`,jCe=`[object Int32Array]`,MCe=`[object Uint8Array]`,NCe=`[object Uint8ClampedArray]`,PCe=`[object Uint16Array]`,FCe=`[object Uint32Array]`;function ICe(e,t,n){var r=e.constructor;switch(t){case DCe:return WC(e);case nT:case rT:return new r(+e);case OCe:return Qw(e,n);case kCe:case oT:case ACe:case sT:case jCe:case MCe:case NCe:case PCe:case FCe:return Gxe(e,n);case iT:return new r;case wCe:case ECe:return new r(e);case TCe:return $w(e);case aT:return new r;case U:return CCe(e)}}var cT=ICe,LCe=`[object Map]`;function lT(e){return nS(e)&&aC(e)==LCe}var RCe=lT,zCe=ZS&&ZS.isMap,BCe=zCe?YS(zCe):RCe,uT=`[object Set]`;function VCe(e){return nS(e)&&aC(e)==uT}var dT=VCe,fT=ZS&&ZS.isSet,HCe=fT?YS(fT):dT,UCe=1,pT=2,WCe=4,GCe=`[object Arguments]`,KCe=`[object Array]`,qCe=`[object Boolean]`,mT=`[object Date]`,JCe=`[object Error]`,YCe=`[object Function]`,XCe=`[object GeneratorFunction]`,ZCe=`[object Map]`,hT=`[object Number]`,gT=`[object Object]`,QCe=`[object RegExp]`,$Ce=`[object Set]`,ewe=`[object String]`,twe=`[object Symbol]`,nwe=`[object WeakMap]`,_T=`[object ArrayBuffer]`,vT=`[object DataView]`,rwe=`[object Float32Array]`,yT=`[object Float64Array]`,bT=`[object Int8Array]`,iwe=`[object Int16Array]`,awe=`[object Int32Array]`,owe=`[object Uint8Array]`,swe=`[object Uint8ClampedArray]`,cwe=`[object Uint16Array]`,lwe=`[object Uint32Array]`,xT={};xT[GCe]=xT[KCe]=xT[_T]=xT[vT]=xT[qCe]=xT[mT]=xT[rwe]=xT[yT]=xT[bT]=xT[iwe]=xT[awe]=xT[ZCe]=xT[hT]=xT[gT]=xT[QCe]=xT[$Ce]=xT[ewe]=xT[twe]=xT[owe]=xT[swe]=xT[cwe]=xT[lwe]=!0,xT[JCe]=xT[YCe]=xT[nwe]=!1;function ST(e,t,n,r,i,a){var o,s=t&UCe,c=t&pT,l=t&WCe;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!mS(e))return e;var u=HS(e);if(u){if(o=vCe(e),!s)return qxe(e,o)}else{var d=aC(e),f=d==YCe||d==XCe;if(qS(e))return UC(e,s);if(d==gT||d==GCe||f&&!i){if(o=c||f?{}:Yxe(e),!s)return c?Jw(e,fCe(o,e)):mCe(e,uCe(o,e))}else{if(!xT[d])return i?e:{};o=cT(e,d,s)}}a||=new NS;var p=a.get(e);if(p)return p;a.set(e,o),HCe(e)?e.forEach(function(r){o.add(ST(r,t,n,r,e,a))}):BCe(e)&&e.forEach(function(r,i){o.set(i,ST(r,t,n,i,e,a))});var m=u?void 0:(l?c?Yw:Mye:c?YC:nC)(e);return jC(m||e,function(r,i){m&&(i=r,r=e[i]),H(o,i,ST(r,t,n,i,e,a))}),o}var W=ST;function uwe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var CT=uwe;function wT(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var TT=wT;function ET(e,t){return t.length<2?e:kbe(e,TT(t,0,-1))}var dwe=ET,fwe=Object.prototype.hasOwnProperty;function pwe(e,t){t=mC(t,e);var n=-1,r=t.length;if(!r)return!0;for(var i=e==null||typeof e!=`object`&&typeof e!=`function`;++n<r;){var a=t[n];if(typeof a==`string`){if(a===`__proto__`&&!fwe.call(e,`__proto__`))return!1;if(a===`constructor`&&n+1<r&&typeof t[n+1]==`string`&&t[n+1]===`prototype`){if(i&&n===0)continue;return!1}}}var o=dwe(e,t);return o==null||delete o[hC(CT(t))]}var mwe=pwe;function DT(e){return rS(e)?void 0:e}var hwe=DT;function gwe(e){return e!=null&&e.length?lw(e,1):[]}var OT=gwe;function _we(e){return rw($C(e,void 0,OT),e+``)}var vwe=_we,kT=1,ywe=2,bwe=4,AT=vwe(function(e,t){var n={};if(e==null)return n;var r=!1;t=uC(t,function(t){return t=mC(t,e),r||=t.length>1,t}),JC(e,Yw(e),n),r&&(n=W(n,kT|ywe|bwe,hwe));for(var i=t.length;i--;)mwe(n,t[i]);return n}),xwe=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function i(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){let r=i(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function c(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],c=!1,l=!1,u=s;for(let i=0;i<e.length;i++){let s=e[i];if(!(s===`[`||s===`]`))if(s===`:`){if(c===!0&&(l=!0),!u(a,r,n))break;if(++t>7){n.error=!0;break}i>0&&e[i-1]===`:`&&(c=!0),r.push(`:`);continue}else if(s===`%`){if(!u(a,r,n))break;u=o}else{a.push(s);continue}}return a.length&&(u===o?n.zone=a.join(``):l?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function l(e){if(u(e,`:`)<2)return{host:e,isIPV6:!1};let t=c(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function u(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function d(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}function f(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function p(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let t=l(n);n=t.isIPV6===!0?`[${t.escapedHost}]`:e.host}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:a,recomposeAuthority:p,normalizeComponentEncoding:f,removeDotSegments:d,isIPv4:r,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:i}})),jT=s(((e,t)=>{var{isUUID:n}=xwe(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=S(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=S(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},y={scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},b={scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0},x={http:h,https:g,ws:_,wss:v,urn:y,"urn:uuid":b};Object.setPrototypeOf(x,null);function S(e){return e&&(x[e]||x[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:x,isValidSchemeName:a,getSchemeHandler:S}})),Swe=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:s}=xwe(),{SCHEMES:c,getSchemeHandler:l}=jT();function u(e,t){return typeof e==`string`?e=m(g(e,t),t):typeof e==`object`&&(e=g(m(e,t),t)),e}function d(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=f(g(e,r),g(t,r),r,!0);return r.skipEscape=!0,m(i,r)}function f(e,t,n,i){let a={};return i||(e=g(m(e,n),n),t=g(m(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function p(e,t,n){return typeof e==`string`?(e=unescape(e),e=m(a(g(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=m(a(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=m(a(g(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=m(a(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function m(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},a=Object.assign({},t),o=[],s=l(a.scheme||n.scheme);s&&s.serialize&&s.serialize(n,a),n.path!==void 0&&(a.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),a.reference!==`suffix`&&n.scheme&&o.push(n.scheme,`:`);let c=i(n);if(c!==void 0&&(a.reference!==`suffix`&&o.push(`//`),o.push(c),n.path&&n.path[0]!==`/`&&o.push(`/`)),n.path!==void 0){let e=n.path;!a.absolutePath&&(!s||!s.absolutePath)&&(e=r(e)),c===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),o.push(e)}return n.query!==void 0&&o.push(`?`,n.query),n.fragment!==void 0&&o.push(`#`,n.fragment),o.join(``)}var h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||``,i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host)if(o(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let t=l(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&a===!1&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!t||t&&!t.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&=escape(unescape(i.path)),i.fragment&&=encodeURI(decodeURIComponent(i.fragment))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return i}var _={SCHEMES:c,normalize:u,resolve:d,resolveComponent:f,equal:p,serialize:m,parse:g};t.exports=_,t.exports.default=_,t.exports.fastUri=_})),MT=d(Swe(),1);function Cwe(e,t){if(`$id`in e&&MT.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(mS(e)){let n=Cwe(e,t);if(n!==void 0)return n}}else if(mS(n)){let e=Cwe(n,t);if(e!==void 0)return e}}function wwe(e,t){let n=_C(e,`$id`,t);`$ref`in e&&(e={...e,[Vx]:MT.default.resolve(n,e[Vx])});for(let[t,r]of Object.entries(e))Array.isArray(r)?e={...e,[t]:r.map(e=>mS(e)?wwe(e,n):e)}:mS(r)&&(e={...e,[t]:wwe(r,n)});return e}function Twe(e,t){let n=t[e];return[AT(t,[e]),n]}function Ewe(e,t={},n=[],r=_C(t,[`$id`])){let i=e||``,a;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));r===void 0||`$id`in t&&t.$id===r?a=Kw.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=Cwe(t,r.replace(/\/$/,``)),a!==void 0&&(a=Kw.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(r?MT.default.resolve(r,i):i).replace(/#\/?$/,``).split(`#`);a=Cwe(t,e.replace(/\/$/,``)),a!==void 0&&(r=a.$id,vw(n)||(a=Kw.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let o=a[Vx];if(o){if(n.includes(o)){if(n.length===1)throw Error(`Definition for ${e} is a circular reference`);let[t,...r]=n,a=[...r,i,t].join(` -> `);throw Error(`Definition for ${t} contains a circular reference through ${a}`)}let[s,c]=Twe(Vx,a),l=Ewe(c,t,[...n,i],r);return Object.keys(s).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[oge]:[s,l]}:{...s,...l}:l}return a}function NT(e,t={},n=_C(t,[`$id`])){return Ewe(e,t,[],n)}var Dwe=`[object String]`;function Owe(e){return typeof e==`string`||!HS(e)&&nS(e)&&eS(e)==Dwe}var PT=Owe;function FT(e){let t,n=_C(e,dge);return PT(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function IT(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:e==null?`null`:typeof e==`boolean`?`boolean`:isNaN(e)?typeof e==`object`?`object`:`string`:`number`}var kwe=aw(function(e){return MSe(lw(e,1,GC,!0))});function LT(e){let{type:t}=e;return!t&&e.const?IT(e.const):!t&&e.enum?`string`:!t&&(e.properties||e.additionalProperties||e.patternProperties)?`object`:(Array.isArray(t)&&(t=t.length===2&&t.includes(`null`)?t.find(e=>e!==`null`):t[0]),t)}function RT(e,t){let n=Object.assign({},e);return Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&Nx(a)?n[r]=RT(i,a):e&&t&&(LT(e)===`object`||LT(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=kwe(i,a):n[r]=a,n},n)}var zT=`[object Number]`;function BT(e){return typeof e==`number`||nS(e)&&eS(e)==zT}var Awe=BT;function jwe(e,t,n){if(e&&n){let r=_C(e,n);if(r===void 0)return;for(let e=0;e<t.length;e++){let i=t[e],a=_C(i,[Bx,n],{});if(!(a.type===`object`||a.type===`array`)&&(a.const===r||a.enum?.includes(r)))return e}}}function Mwe(e,t,n,r,i){if(t===void 0)return 0;let a=jwe(t,n,i);if(Awe(a))return a;for(let a=0;a<n.length;a++){let o=n[a];if(i&&vC(o,[`properties`,i])){let n=_C(t,i),s=_C(o,[Bx,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[Bx]).map(e=>({required:[e]}))},i;if(o.anyOf){let{...e}=o;e.allOf?e.allOf=e.allOf.slice():e.allOf=[],e.allOf.push(n),i=e}else i=Object.assign({},o,n);if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}function VT(e,t,n={},r,i,a=!1){return XT(e,t,n,r,void 0,void 0,i,a)[0]}function HT(e,t,n,r,i,a,o){let{if:s,then:c,else:l,...u}=t,d=e.isValid(s,a||{},n),f=[u],p=[];if(r)c&&typeof c!=`boolean`&&(p=p.concat(XT(e,c,n,a,r,i,o))),l&&typeof l!=`boolean`&&(p=p.concat(XT(e,l,n,a,r,i,o)));else{let t=d?c:l;t&&typeof t!=`boolean`&&(p=p.concat(XT(e,t,n,a,r,i,o)))}return p.length&&(f=p.map(e=>RT(u,e))),f.flatMap(t=>XT(e,t,n,a,r,i,o))}function UT(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>uxe(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function WT(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(wC(t,[n],e.patternProperties[n]),t),{})}function Nwe(e,t,n,r,i,a,o,s){let c=Pwe(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?Rwe(e,t,n,r,i,a,o).flatMap(t=>XT(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?UT(t.allOf.map(t=>XT(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function Pwe(e,t,n,r,i,a,o,s){let c=GT(t,n,i,void 0,s);return c===t?[t]:XT(e,c,n,a,r,i,o,s)}function GT(e,t,n,r,i){if(!Nx(e))return e;let a=e;if(`$ref`in a){let{$ref:e,...i}=a;if(n.includes(e))return a;n.push(e),a={...NT(e,t,r),...i},`$id`in a&&(r=a.$id)}if(`properties`in a){let e=[],o=zC(a[Bx],(a,o,s)=>{let c=[...n];a[s]=GT(o,t,c,r,i),e.push(c)},{});ow(n,PSe(dw(e))),a={...a,[Bx]:o}}if(`items`in a&&!Array.isArray(a.items)&&typeof a.items!=`boolean`&&(a={...a,items:GT(a.items,t,n,r,i)}),i){let o,s;`anyOf`in e&&Array.isArray(e.anyOf)?(o=Fx,s=a[Fx]):`oneOf`in e&&Array.isArray(e.oneOf)&&(o=zx,s=a[zx]),o&&s&&(a={...a,[o]:s.map(e=>GT(e,t,n,r,i))})}return oC(e,a)?e:a}function KT(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&Nx(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=WT(a,t);if(!vw(r)){a.properties[t]=VT(e,{[oge]:Object.values(r)},n,_C(o,[t]),i),wC(a.properties,[t,Px],!0);return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:IT(_C(o,[t]))}:`$ref`in a.additionalProperties?VT(e,{[Vx]:_C(a.additionalProperties,[Vx])},n,o,i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:IT(_C(o,[t]))},a.properties[t]=r,wC(a.properties,[t,Px],!0)}else a.properties[t]={type:`null`},wC(a.properties,[t,Px],!0)}}),a}var{compareSchemaDefinitions:qT,compareSchemaValues:JT}=XSe(),{mergeArrayOfSchemaDefinitions:Fwe}=lCe({intersectJson:KSe(JT),deduplicateJsonSchemaDef:GSe(qT)}),Iwe=Gw(Fwe);function YT(e){return Iwe(e)}function XT(e,t,n,r,i=!1,a=[],o,s){return Nx(t)?Nwe(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return HT(e,c,n,i,a,r,o);if(`allOf`in c){if(i){let{allOf:e,...t}=c;return[...e,t]}try{let e=[],t=[];(s=c.allOf)==null||s.forEach(n=>{typeof n==`object`&&n.contains?e.push(n):t.push(n)}),e.length&&(c={...c,allOf:t}),c=o?o(c):YT(c),e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
|
|
67
|
+
`);if(!n)continue;let r;try{r=JSON.parse(n)}catch{continue}t(r)}}}catch(e){a||n?.(e)}})(),{close:()=>{a=!0,i.abort()}}}async fetch(e,t,n,r){return this.verifyServerUrlSet(),e=e.startsWith(`/`)?`${this.options.serverUrl}${e}`:`${this.options.serverUrl}/${e}`,await Lpe(e,n,{...r,method:t,mode:this.options.mode,credentials:this.options.credentials,headers:{...this.getHeaders(),...r?.headers}})}verifyServerUrlSet(){if(!this.options.serverUrl)throw Error(`Server url is not set`)}transformDates(e){return this.options.transformDate===!1?e:Ipe(e)}},uy=class extends Rpe{async post(e,...t){let[n,r]=t;return super.api(e,`POST`,n,r)}async get(e,...t){let[n,r]=t;return super.api(e,`GET`,n,r)}async patch(e,...t){let[n,r]=t;return super.api(e,`PATCH`,n,r)}async head(e,...t){let[n,r]=t;return super.api(e,`HEAD`,n,r)}async delete(e,...t){let[n,r]=t;return super.api(e,`DELETE`,n,r)}async fetch(e,t,n,r){return await super.fetch(e,t,n,r)}};new uy;var dy=class{constructor(){this.pikkuFetch=new uy,this.invoke=((e,t)=>this.pikkuFetch.post(`/rpc/${String(e)}`,{rpcName:String(e),data:t})),this.startWorkflow=async(e,t)=>await this.pikkuFetch.post(`/workflow/${String(e)}/start`,{data:t}),this.runWorkflow=async(e,t)=>await this.pikkuFetch.post(`/workflow/${String(e)}/run`,{data:t}),this.workflowStatus=async(e,t)=>await this.pikkuFetch.get(`/workflow/${String(e)}/status/${t}`),this.agent={run:(async(e,t)=>await this.pikkuFetch.post(`/rpc/agent/${String(e)}`,t)),stream:async(e,t)=>await this.pikkuFetch.post(`/rpc/agent/${String(e)}/stream`,t),approve:async(e,t)=>await this.pikkuFetch.post(`/rpc/agent/${String(e)}/approve`,t)}}setPikkuFetch(e){this.pikkuFetch=e}setServerUrl(e){this.pikkuFetch.setServerUrl(e)}setAuthorizationJWT(e){this.pikkuFetch.setAuthorizationJWT(e)}setAPIKey(e){this.pikkuFetch.setAPIKey(e)}subscribeToSSE(e,t,n){return this.pikkuFetch.subscribeToSSE(e,t,n)}};new dy;const fy=e=>{let t=new uy;t.setServerUrl(e.serverUrl);let n=new dy;return n.setPikkuFetch(t),{fetch:t,rpc:n}};var zpe=`pikku-server-url`,py=`http://localhost:4002`;const my=()=>{try{let e=new URLSearchParams(window.location.search).get(`server`);return e?(localStorage.setItem(zpe,e),e):localStorage.getItem(zpe)||py}catch{return py}},Bpe=e=>{localStorage.setItem(zpe,e)};var hy=(0,A.createContext)(null),Vpe=(0,A.createContext)(null);const gy=(0,A.createContext)(null),Hpe=({children:e,serverUrl:t})=>{let n=t??my(),r=(0,A.useMemo)(()=>fy({serverUrl:n,credentials:`include`}),[n]);return(0,j.jsx)(hy.Provider,{value:r,children:(0,j.jsx)(Vpe.Provider,{value:r.fetch,children:e})})},_y=({children:e})=>{let t=(0,A.useContext)(hy);if(!t)throw Error(`PikkuRPCProvider must be used within PikkuHTTPProvider`);return(0,j.jsx)(gy.Provider,{value:t.rpc,children:e})},vy=()=>{let e=(0,A.useContext)(gy);if(!e)throw Error(`usePikkuRPC must be used within PikkuRPCProvider`);return e},Upe=()=>{let e=(0,A.useContext)(hy);if(!e)throw Error(`usePikkuSSE must be used within PikkuHTTPProvider`);return e.fetch.subscribeToSSE.bind(e.fetch)};var yy=(0,A.createContext)(null);const by=yy.Provider,xy=()=>{let e=(0,A.useContext)(yy);if(!e)throw Error(`useConsoleRouter must be used within a ConsoleRouterProvider`);return e},Sy=()=>xy().Link,Cy=()=>xy().useNavigate(),Wpe=()=>xy().useLocation(),wy=()=>xy().useSearchParams();var Ty=(0,A.forwardRef)(({to:e,children:t,...n},r)=>(0,j.jsx)(rr,{to:e,ref:r,...n,children:t}));Ty.displayName=`Link`;const Ey={Link:Ty,useNavigate:()=>{let e=dn();return t=>e(t)},useLocation:()=>({pathname:cn().pathname}),useSearchParams:Wee},Dy=If,Oy=uf,ky=Hoe,R=(({lineBreaks:e,style:t,children:n,...r})=>{let i=e&&(typeof n==`string`||typeof n==`number`)?{...t,whiteSpace:`pre-line`}:t;return(0,A.createElement)(lf,{...r,style:i},n)}),Ay=Wd,Gpe=Gd,Kpe=fm,qpe=lg,jy=ah,My=Dse,Ny=Um,Py=Sp,Fy=cf,Iy=Yh,Jpe=Rm,Ly=Rp,Ype=vle,Xpe=sh,Zpe=Lce,Ry=jh,zy=Jh;(0,A.createContext)(null);const z=e=>e,Qpe=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Vy(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)};var By={};const $pe=(e,t,n,r)=>{Vy(n)&&By[n]||(Vy(n)&&(By[n]=new Date),Qpe(e,t,n,r))};var eme=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}};const tme=(e,t,n)=>{e.loadNamespaces(t,eme(e,n))},nme=(e,t,n,r)=>{if(Vy(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return tme(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,eme(e,r))},rme=(e,t,n={})=>!t.languages||!t.languages.length?($pe(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),Vy=e=>typeof e==`string`,ime=e=>typeof e==`object`&&!!e;var ame=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ome={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},sme=e=>ome[e],Hy={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(ame,sme)};const cme=()=>Hy;var lme;const Uy=()=>lme,ume=(0,A.createContext)();var Wy=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},dme=(e,t)=>{let n=(0,A.useRef)();return(0,A.useEffect)(()=>{n.current=t?n.current:e},[e,t]),n.current},fme=(e,t,n,r)=>e.getFixedT(t,n,r),Gy=(e,t,n,r)=>(0,A.useCallback)(fme(e,t,n,r),[e,t,n,r]);const pme=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,A.useContext)(ume)||{},a=n||r||Uy();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Wy),!a){$pe(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let e=(e,t)=>Vy(t)?t:ime(t)&&Vy(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react?.wait&&$pe(a,`DEPRECATED_OPTION`,`useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);let o={...cme(),...a.options.react,...t},{useSuspense:s,keyPrefix:c}=o,l=e||i||a.options?.defaultNS;l=Vy(l)?[l]:l||[`translation`],a.reportNamespaces.addUsedNamespaces?.(l);let u=(a.isInitialized||a.initializedStoreOnce)&&l.every(e=>rme(e,a,o)),d=Gy(a,t.lng||null,o.nsMode===`fallback`?l:l[0],c),f=()=>d,p=()=>fme(a,t.lng||null,o.nsMode===`fallback`?l:l[0],c),[m,h]=(0,A.useState)(f),g=l.join();t.lng&&(g=`${t.lng}${g}`);let _=dme(g),v=(0,A.useRef)(!0);(0,A.useEffect)(()=>{let{bindI18n:e,bindI18nStore:n}=o;v.current=!0,!u&&!s&&(t.lng?nme(a,t.lng,l,()=>{v.current&&h(p)}):tme(a,l,()=>{v.current&&h(p)})),u&&_&&_!==g&&v.current&&h(p);let r=()=>{v.current&&h(p)};return e&&a?.on(e,r),n&&a?.store.on(n,r),()=>{v.current=!1,a&&e&&e?.split(` `).forEach(e=>a.off(e,r)),n&&a&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,g]),(0,A.useEffect)(()=>{v.current&&u&&h(f)},[a,c,u]);let y=[m,a,u];if(y.t=m,y.i18n=a,y.ready=u,u||!u&&!s)return y;throw new Promise(e=>{t.lng?nme(a,t.lng,l,()=>e()):tme(a,l,()=>e())})};function Ky({i18n:e,defaultNS:t,children:n}){let r=(0,A.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,A.createElement)(ume.Provider,{value:r},n)}function qy(){let e=pme();return{...e,t:e.t}}var mme=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),hme=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),gme=e=>{let t=hme(e);return t.charAt(0).toUpperCase()+t.slice(1)},_me=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Jy=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},Yy={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`},Xy=(0,A.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,A.createElement)(`svg`,{ref:c,...Yy,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_me(`lucide`,i),...!a&&!Jy(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,A.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Zy=(e,t)=>{let n=(0,A.forwardRef)(({className:n,...r},i)=>(0,A.createElement)(Xy,{ref:i,iconNode:t,className:_me(`lucide-${mme(gme(e))}`,`lucide-${e}`,n),...r}));return n.displayName=gme(e),n},vme=Zy(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),yme=Zy(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Qy=Zy(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),bme=Zy(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),$y=Zy(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),xme=Zy(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),eb=Zy(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),Sme=Zy(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Cme=Zy(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),tb=Zy(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),nb=Zy(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),wme=Zy(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),rb=Zy(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ib=Zy(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Tme=Zy(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ab=Zy(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),ob=Zy(`clock`,[[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),B=Zy(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Eme=Zy(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),sb=Zy(`copy`,[[`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`}]]),Dme=Zy(`corner-down-right`,[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),cb=Zy(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),lb=Zy(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Ome=Zy(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),kme=Zy(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Ame=Zy(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ub=Zy(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),jme=Zy(`factory`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`,key:`1iv0i2`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Mme=Zy(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Nme=Zy(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),db=Zy(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Pme=Zy(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),fb=Zy(`git-branch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),pb=Zy(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),mb=Zy(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Fme=Zy(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),hb=Zy(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),gb=Zy(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),_b=Zy(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Ime=Zy(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),vb=Zy(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Lme=Zy(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),yb=Zy(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Rme=Zy(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),zme=Zy(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),Bme=Zy(`lock-open`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]]),Vme=Zy(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),bb=Zy(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Hme=Zy(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Ume=Zy(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),xb=Zy(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Sb=Zy(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),Cb=Zy(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Wme=Zy(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),wb=Zy(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Tb=Zy(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Eb=Zy(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),Gme=Zy(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Db=Zy(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ob=Zy(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Kme=Zy(`repeat`,[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]),qme=Zy(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),Jme=Zy(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),kb=Zy(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Ab=Zy(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),jb=Zy(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Mb=Zy(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Yme=Zy(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Xme=Zy(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Zme=Zy(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Nb=Zy(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Qme=Zy(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),$me=Zy(`split`,[[`path`,{d:`M16 3h5v5`,key:`1806ms`}],[`path`,{d:`M8 3H3v5`,key:`15dfkv`}],[`path`,{d:`M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3`,key:`1qrqzj`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}]]),Pb=Zy(`square-function`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3`,key:`m1af9g`}],[`path`,{d:`M9 11.2h5.7`,key:`3zgcl2`}]]),ehe=Zy(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),the=Zy(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),Fb=Zy(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),nhe=Zy(`timer`,[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]),rhe=Zy(`trash-2`,[[`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`}]]),Ib=Zy(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ihe=Zy(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),Lb=Zy(`user-check`,[[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),ahe=Zy(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),ohe=Zy(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),she=Zy(`variable`,[[`path`,{d:`M8 21s-4-3-4-9 4-9 4-9`,key:`uto9ud`}],[`path`,{d:`M16 3s4 3 4 9-4 9-4 9`,key:`4w2vsq`}],[`line`,{x1:`15`,x2:`9`,y1:`9`,y2:`15`,key:`f7djnv`}],[`line`,{x1:`9`,x2:`15`,y1:`9`,y2:`15`,key:`1shsy8`}]]),che=Zy(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),lhe=Zy(`webhook`,[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,key:`q3hayz`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,key:`1go1hn`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,key:`qlwsc0`}]]),uhe=Zy(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Rb=Zy(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),zb=Zy(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Bb=Zy(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);function dhe(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function fhe(e){return(0,A.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var phe=()=>dhe({opened:!1,empty:!1,selected:-1,listId:``,query:``,registeredActions:new Set}),Vb=e=>fhe(e);function Hb(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function mhe(e){Hb(()=>({opened:!0,selected:-1}),e)}function Ub(e){Hb(()=>({opened:!1}),e)}function Wb(e){Hb(e=>({opened:!e.opened,selected:e.opened?e.selected:-1}),e)}function Gb(e,t){t.updateState(t=>({...t,selected:e}))}function Kb(e,t){t.updateState(t=>({...t,listId:e}))}function qb(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t instanceof ShadowRoot?t.host.children:t.children;for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=qb(e,n.shadowRoot);if(t)return t}let i=qb(e,n);if(i)return i}return null}function Jb(e,t){let n=t.getState(),r=n.listId?qb(`#${n.listId}`):null,i=r?.querySelector(`[data-selected]`),a=r?.querySelectorAll(`[data-action]`)??[],o=to(e===-1?a.length-1:e===a.length?0:e,0,a.length-1);return i?.removeAttribute(`data-selected`),a[o]?.scrollIntoView({block:`nearest`}),a[o]?.setAttribute(`data-selected`,`true`),Gb(o,t),o}function Yb(e){return Jb(e.getState().selected+1,e)}function hhe(e){return Jb(e.getState().selected-1,e)}function Xb(e){qb(`#${e.getState().listId} [data-selected]`)?.click()}function Zb(e,t){let n=t.getState();return n.registeredActions.add(e),()=>{n.registeredActions.delete(e)}}function ghe(e,t){Hb(()=>({query:e}),t),Promise.resolve().then(()=>{Jb(0,t),Hb(e=>({empty:e.query.trim().length>0&&e.registeredActions.size===0||!1}),t)})}function _he({clearQuery:e},t){t.updateState(t=>({...t,selected:-1,query:e?``:t.query,empty:e?!1:t.empty}))}var Qb={open:mhe,close:Ub,toggle:Wb,updateState:Hb,setSelectedAction:Gb,setListId:Kb,selectAction:Jb,selectNextAction:Yb,selectPreviousAction:hhe,triggerSelectedAction:Xb,registerAction:Zb,setQuery:ghe,clearSpotlightState:_he};function $b(){let e=phe();return[e,{open:()=>mhe(e),close:()=>Ub(e),toggle:()=>Wb(e)}]}var[ex,tx]=$b(),{open:vhe,close:yhe,toggle:bhe}=tx;function xhe(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}function nx(e){return Array.isArray(e)?e.map(e=>e.trim()).join(`,`).toLowerCase().trim():typeof e==`string`?e.toLowerCase().trim():``}function She(e){return e.reduce((e,t)=>`actions`in t?[...e,...t.actions.map(e=>({...e,group:t.group}))]:[...e,t],[])}function Che(e){let t={},n=[];return e.forEach(e=>{e.group?(t[e.group]||(t[e.group]={pushed:!1,data:{group:e.group,actions:[]}}),t[e.group].data.actions.push(e),t[e.group].pushed||(t[e.group].pushed=!0,n.push(t[e.group].data))):n.push(e)}),n}var whe=(e,t)=>{let n=e.trim().toLowerCase(),r=[[],[]];return She(t).forEach(e=>{e.label?.toLowerCase().includes(n)?r[0].push(e):(e.description?.toLowerCase().includes(n)||nx(e.keywords).includes(n))&&r[1].push(e)}),Che(r.flat())};function The(e,t){if(!Array.isArray(e))return[];let n=0;return e.reduce((e,r)=>{if(n>=t)return e;if(xhe(r)){let i=The(r.actions,t-n);e.push({group:r.group,actions:i}),n+=i.length}else e.push(r),n+=1;return e},[])}var rx={root:`m_d2b315db`,content:`m_3cd250e0`,body:`m_d2abce9b`,search:`m_f366a061`,actionsList:`m_6e463822`,action:`m_d49bb8ef`,actionBody:`m_3d475731`,actionSection:`m_832642f6`,actionLabel:`m_6c2a1345`,actionDescription:`m_a6d9d78d`,empty:`m_82f78f74`,footer:`m_ddcaf054`,actionsGroup:`m_5a3e5f7b`},[Ehe,ix]=Ha(`Spotlight component was not found in tree`),Dhe={dimmedSections:!0,highlightQuery:!1},ax=Kc((e,t)=>{let{className:n,style:r,classNames:i,styles:a,id:o,description:s,label:c,leftSection:l,rightSection:u,children:d,dimmedSections:f,highlightQuery:p,highlightColor:m,closeSpotlightOnTrigger:h,onClick:g,onMouseDown:_,keywords:v,vars:y,...b}=yc(`SpotlightAction`,Dhe,e),x=ix(),S={classNames:i,styles:a},C=p&&typeof c==`string`?(0,j.jsx)(lce,{component:`span`,highlight:x.query,color:m,...x.getStyles(`actionLabel`,S),children:c}):(0,j.jsx)(`span`,{...x.getStyles(`actionLabel`,S),children:c});return(0,j.jsx)(kd,{ref:t,"data-action":!0,...x.getStyles(`action`,{className:n,style:r,...S}),...b,onMouseDown:e=>{e.preventDefault(),_?.(e)},onClick:e=>{g?.(e),(h??x.closeOnActionTrigger)&&Qb.close(x.store)},tabIndex:-1,children:d||(0,j.jsxs)(j.Fragment,{children:[l&&(0,j.jsx)(M,{component:`span`,mod:{position:`left`,dimmed:f},...x.getStyles(`actionSection`,S),children:l}),(0,j.jsxs)(`span`,{...x.getStyles(`actionBody`,S),children:[C,(0,j.jsx)(`span`,{...x.getStyles(`actionDescription`,S),children:s})]}),u&&(0,j.jsx)(M,{component:`span`,mod:{position:`right`,dimmed:f},...x.getStyles(`actionSection`,S),children:u})]})})});ax.classes=rx,ax.displayName=`@mantine/spotlight/SpotlightAction`;var ox=Kc((e,t)=>{let{className:n,style:r,styles:i,classNames:a,label:o,children:s,...c}=yc(`SpotlightActionsGroup`,null,e);return(0,j.jsx)(M,{...ix().getStyles(`actionsGroup`,{className:n,style:r,classNames:a,styles:i}),ref:t,...c,__vars:{"--spotlight-label":`'${o?.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`},children:s})});ox.classes=rx,ox.displayName=`@mantine/core/SpotlightActionsGroup`;var sx=Kc((e,t)=>{let{className:n,style:r,id:i,children:a,vars:o,classNames:s,styles:c,...l}=yc(`SpotlightActionsList`,null,e),u=ix(),d=`mantine-${(0,A.useId)().replace(/:/g,``)}`,f=i||d;return(0,A.useEffect)(()=>(Qb.setListId(f,u.store),()=>Qb.setListId(``,u.store)),[]),(0,j.jsx)(Ed.Autosize,{...u.getStyles(`actionsList`,{className:n,style:r,classNames:s,styles:c}),ref:t,type:`scroll`,scrollbarSize:`var(--spotlight-actions-list-padding)`,offsetScrollbars:`y`,id:f,...l,children:a})});sx.classes=rx,sx.displayName=`@mantine/spotlight/SpotlightActionsList`;var cx=Kc((e,t)=>{let{className:n,style:r,classNames:i,styles:a,...o}=yc(`SpotlightEmpty`,null,e);return(0,j.jsx)(M,{ref:t,...ix().getStyles(`empty`,{classNames:i,styles:a,className:n,style:r}),...o})});cx.classes=rx,cx.displayName=`@mantine/spotlight/SpotlightEmpty`;var lx=Kc((e,t)=>{let{className:n,style:r,classNames:i,styles:a,...o}=yc(`SpotlightFooter`,null,e);return(0,j.jsx)(M,{ref:t,...ix().getStyles(`footer`,{className:n,classNames:i,style:r,styles:a}),...o})});lx.classes=rx,lx.displayName=`@mantine/spotlight/SpotlightFooter`;function ux(e,t){if(!e)return[];let n=()=>Qb.open(t);return Array.isArray(e)?e.map(e=>[e,n]):[[e,n]]}var dx={size:600,yOffset:80,zIndex:Ka(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:ex,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`,maxHeight:400},fx=Kc((e,t)=>{let n=yc(`SpotlightRoot`,dx,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,store:l,children:u,query:d,onQueryChange:f,transitionProps:p,clearQueryOnClose:m,shortcut:h,tagsToIgnore:g,triggerOnContentEditable:_,disabled:v,onSpotlightOpen:y,onSpotlightClose:b,forceOpened:x,closeOnActionTrigger:S,maxHeight:C,scrollable:w,attributes:T,...E}=n,D=Fs(),{opened:O,query:k}=Vb(l),ee=typeof d==`string`?d:k,te=e=>{f?.(e),Qb.setQuery(e,l)},ne=mc({name:`Spotlight`,classes:rx,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:T});return Rte(ux(h,l),g,_),fo(()=>{O?y?.():b?.()},[O]),v?null:(0,j.jsx)(Ehe,{value:{getStyles:ne,query:ee,setQuery:te,store:l,closeOnActionTrigger:S},children:(0,j.jsx)(nm,{ref:t,...E,withCloseButton:!1,opened:O||!!x,padding:0,onClose:()=>Qb.close(l),className:i,style:a,classNames:ts({theme:D,classNames:[rx,r],props:n,stylesCtx:void 0}),styles:ns({theme:D,styles:o,props:n,stylesCtx:void 0}),transitionProps:{...p,onExited:()=>{m&&te(``),Qb.clearSpotlightState({clearQuery:m},l),p?.onExited?.()}},__vars:{"--spotlight-max-height":w?Ra(C):void 0},__staticSelector:`Spotlight`,"data-scrollable":w||void 0,children:u})})});fx.classes=rx,fx.displayName=`@mantine/spotlight/SpotlightRoot`;var px={size:`lg`},mx=Kc((e,t)=>{let{classNames:n,styles:r,onKeyDown:i,onChange:a,vars:o,value:s,...c}=yc(`SpotlightSearch`,px,e),l=ix(),u=l.getStyles(`search`),[d,f]=(0,A.useState)(!1),p=e=>{i?.(e),!d&&(e.nativeEvent.code===`ArrowDown`&&(e.preventDefault(),Qb.selectNextAction(l.store)),e.nativeEvent.code===`ArrowUp`&&(e.preventDefault(),Qb.selectPreviousAction(l.store)),(e.nativeEvent.code===`Enter`||e.nativeEvent.code===`NumpadEnter`)&&(e.preventDefault(),Qb.triggerSelectedAction(l.store)))};return(0,j.jsx)(nf,{ref:t,classNames:[{input:u.className},n],styles:[{input:u.style},r],...c,value:s??l.query,onChange:e=>{l.setQuery(e.currentTarget.value),a?.(e)},onKeyDown:p,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});mx.classes=rx,mx.displayName=`@mantine/spotlight/SpotlightSearch`;var hx={size:600,yOffset:80,limit:1/0,zIndex:Ka(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:ex,filter:whe,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`},gx=Kc((e,t)=>{let{searchProps:n,filter:r,query:i,onQueryChange:a,actions:o,nothingFound:s,highlightQuery:c,limit:l,scrollAreaProps:u,...d}=yc(`Spotlight`,hx,e),[f,p]=No({value:i,defaultValue:``,finalValue:``,onChange:a}),m=The(r(f,o),l).map(e=>{if(xhe(e)){let t=e.actions.map(({id:e,...t})=>(0,j.jsx)(ax,{highlightQuery:c,...t},e));return(0,j.jsx)(ox,{label:e.group,children:t},e.group)}return(0,j.jsx)(ax,{highlightQuery:c,...e},e.id)});return(0,j.jsxs)(fx,{...d,query:f,onQueryChange:p,ref:t,children:[(0,j.jsx)(mx,{...n}),(0,j.jsxs)(sx,{...u,children:[m,m.length===0&&s&&(0,j.jsx)(cx,{children:s})]})]})});gx.classes=rx,gx.displayName=`@mantine/spotlight/Spotlight`,gx.Search=mx,gx.ActionsList=sx,gx.Action=ax,gx.Empty=cx,gx.ActionsGroup=ox,gx.Footer=lx,gx.Root=fx,gx.open=tx.open,gx.close=tx.close,gx.toggle=tx.toggle;var Ohe=(0,A.createContext)(void 0);const _x=()=>{let e=(0,A.useContext)(Ohe);if(!e)throw Error(`usePikkuMeta must be used within PikkuMetaProvider`);return e};var khe={functions:[],httpMeta:[],cliMeta:[],cliRenderers:{},channelsMeta:{},queueMeta:{},schedulerMeta:{},rpcMeta:{},mcpMeta:[],workflows:{},triggerMeta:{},triggerSourceMeta:{},middlewareGroupsMeta:{definitions:{},instances:{},httpGroups:{},tagGroups:{}},permissionsGroupsMeta:{definitions:{},httpGroups:{},tagGroups:{}},agentsMeta:{},emailsMeta:{src:``,themeHash:``,templates:{}},secretsMeta:{},credentialsMeta:{},variablesMeta:{}},Ahe={functions:0,workflows:0,httpRoutes:0,channels:0,mcpTools:0,schedulers:0,queues:0,cliCommands:0,rpcMethods:0,triggers:0,triggerSources:0,agents:0,emails:0,secrets:0,variables:0};const jhe=({children:e})=>{let t=vy(),[n,r]=(0,A.useState)(khe),[i,a]=(0,A.useState)(Ahe),[o,s]=(0,A.useState)({}),[c,l]=(0,A.useState)(!0),[u,d]=(0,A.useState)(null),f=(0,A.useCallback)(async()=>{l(!0),d(null);try{let e=await t.invoke(`console:getAllMeta`);r({functions:e.functions,httpMeta:e.httpMeta,cliMeta:e.cliMeta,cliRenderers:e.cliRenderers,channelsMeta:e.channelsMeta,queueMeta:e.queueMeta,schedulerMeta:e.schedulerMeta,rpcMeta:e.rpcMeta,mcpMeta:e.mcpMeta,workflows:e.workflows,triggerMeta:e.triggerMeta,triggerSourceMeta:e.triggerSourceMeta,middlewareGroupsMeta:e.middlewareGroupsMeta,permissionsGroupsMeta:e.permissionsGroupsMeta,agentsMeta:e.agentsMeta,emailsMeta:e.emailsMeta,secretsMeta:e.secretsMeta,credentialsMeta:e.credentialsMeta??{},variablesMeta:e.variablesMeta}),a(e.counts),s(e.functionUsedBy)}catch(e){d(e.message||`Failed to load metadata`)}finally{l(!1)}},[t]);(0,A.useEffect)(()=>{f()},[f]);let p=(0,A.useMemo)(()=>{let e=new Map;for(let[t,n]of Object.entries(o))e.set(t,n);return e},[o]);return(0,j.jsx)(Ohe.Provider,{value:{meta:n,counts:i,functionUsedBy:p,loading:c,error:u,refresh:f},children:e})};var vx={flexColumn:`_flexColumn_a6ki2_3`,flexRow:`_flexRow_a6ki2_9`,flexGrow:`_flexGrow_a6ki2_14`,overflowAuto:`_overflowAuto_a6ki2_19`,overflowHidden:`_overflowHidden_a6ki2_23`,noShrink:`_noShrink_a6ki2_27`,listDetailContainer:`_listDetailContainer_a6ki2_33`,listPane:`_listPane_a6ki2_38`,listPaneFlex:`_listPaneFlex_a6ki2_43 _listPane_a6ki2_38`,listPaneFixed:`_listPaneFixed_a6ki2_48 _listPane_a6ki2_38`,detailPane:`_detailPane_a6ki2_52`,detailDrawerPane:`_detailDrawerPane_a6ki2_58`,gridHeader:`_gridHeader_a6ki2_69`,gridHeaderLabel:`_gridHeaderLabel_a6ki2_77`,listItem:`_listItem_a6ki2_84`,listItemPadded:`_listItemPadded_a6ki2_96 _listItem_a6ki2_84`,detailHeader:`_detailHeader_a6ki2_106`,detailBody:`_detailBody_a6ki2_115`,metaRow:`_metaRow_a6ki2_122`,metaRowLabel:`_metaRowLabel_a6ki2_130`,metaRowContent:`_metaRowContent_a6ki2_135`,sectionLabel:`_sectionLabel_a6ki2_142`,emptyState:`_emptyState_a6ki2_149`,surfaceCard:`_surfaceCard_a6ki2_158`,tableLastRowBorder:`_tableLastRowBorder_a6ki2_164`,listSurfaceCard:`_listSurfaceCard_a6ki2_168 _surfaceCard_a6ki2_158`,tagBadge:`_tagBadge_a6ki2_179`,serviceBadge:`_serviceBadge_a6ki2_185`,clickableText:`_clickableText_a6ki2_193`,splitLeft:`_splitLeft_a6ki2_199`,splitRight:`_splitRight_a6ki2_206`,codeInputBox:`_codeInputBox_a6ki2_215`,separator:`_separator_a6ki2_227`,groupLabel:`_groupLabel_a6ki2_235`,typeDot:`_typeDot_a6ki2_244`,drawerButton:`_drawerButton_a6ki2_253`,drawerIconBox:`_drawerIconBox_a6ki2_259`,centeredLoader:`_centeredLoader_a6ki2_263`,chatMessageRight:`_chatMessageRight_a6ki2_268`,chatMessageLeft:`_chatMessageLeft_a6ki2_274`};const Mhe=[{title:z(`Run`),items:[{label:z(`Functions`),href:`/functions`,icon:Pb,matchPrefix:`/functions`},{label:z(`Workflows`),href:`/workflow`,icon:fb,matchPrefix:`/workflow`},{label:z(`Agents`),href:`/agents`,icon:$y,matchPrefix:`/agents`},{label:z(`Tests`),href:`/tests`,icon:Nme,matchPrefix:`/tests`}]},{title:z(`Data`),items:[{label:z(`Database`),href:`/database`,icon:lb,matchPrefix:`/database`},{label:z(`APIs`),href:`/apis`,icon:mb,matchPrefix:`/apis`},{label:z(`Jobs`),href:`/jobs`,icon:ob,matchPrefix:`/jobs`},{label:z(`Runtime`),href:`/runtime`,icon:jb,matchPrefix:`/runtime`},{label:z(`Emails`),href:`/emails`,icon:bb,matchPrefix:`/emails`}]},{title:z(`Config`),items:[{label:z(`Secrets`),href:`/secrets`,icon:hb,matchPrefix:`/secrets`},{label:z(`Environment Variables`),href:`/variables`,icon:she,matchPrefix:`/variables`},{label:z(`Addons`),href:`/addons`,icon:xb,matchPrefix:`/addons`}]},{title:z(`Users`),items:[{label:z(`OAuth`),href:`/users`,icon:ohe,matchPrefix:`/users`},{label:z(`Credentials`),href:`/credentials`,icon:hb,matchPrefix:`/credentials`}]},{title:z(``),items:[{label:z(`Changes`),href:`/changes`,icon:pb,matchPrefix:`/changes`}]}];var Nhe={logo:(0,j.jsx)(`img`,{src:`/`+`pikku-console-logo.png`.replace(/^\//,``),alt:`Pikku Console`,width:28,height:28,style:void 0}),title:z(`Pikku Console`),tooltipLabel:z(`Pikku Console`),homeHref:`/`},yx=60,bx=210;const xx=({sections:e=Mhe,branding:t=Nhe,footer:n})=>{let r=Sy(),{t:i}=qy(),a=Fs(),{pathname:o}=Wpe(),{refresh:s,loading:c}=_x(),[l,u]=Do({key:`sidebar-collapsed`,defaultValue:!1}),{colorScheme:d,toggleColorScheme:f}=_c(),p=l?yx:bx,m=e=>o.includes(e.matchPrefix);return(0,j.jsxs)(M,{pos:`fixed`,left:0,top:0,w:p,h:`100vh`,style:{borderRight:`1px solid var(--app-glass-border)`,backgroundColor:`var(--mantine-color-body)`,display:`flex`,flexDirection:`column`,transition:`width 200ms ease`,overflow:`hidden`,zIndex:100},children:[(0,j.jsxs)(M,{px:l?`xs`:`sm`,py:`xs`,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`space-between`,height:50,flexShrink:0},children:[(0,j.jsx)(jy,{label:t.tooltipLabel,position:`right`,disabled:!l,children:(0,j.jsxs)(r,{to:t.homeHref,style:{display:`flex`,alignItems:`center`,gap:8,textDecoration:`none`,color:`inherit`},children:[t.logo,!l&&(0,j.jsx)(R,{size:`lg`,fw:500,children:t.title})]})}),!l&&(0,j.jsx)(jy,{label:i(`sidebar.search`),children:(0,j.jsx)(Ay,{variant:`subtle`,size:`sm`,color:`gray`,onClick:tx.open,children:(0,j.jsx)(Ab,{size:16})})})]}),(0,j.jsx)(M,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`},py:4,children:e.map((e,t)=>(0,j.jsxs)(M,{children:[t>0&&(0,j.jsx)(My,{my:4,mx:`sm`}),e.title&&(l?null:(0,j.jsx)(R,{size:`xs`,fw:600,px:`sm`,style:{color:`var(--mantine-color-dimmed)`,textTransform:`uppercase`,letterSpacing:`0.06em`,fontSize:10,paddingTop:8,paddingBottom:2},children:e.title})),e.items.map(e=>{let t=m(e);return l?(0,j.jsx)(jy,{label:e.label,position:`right`,children:(0,j.jsx)(M,{px:6,py:2,children:(0,j.jsx)(Kpe,{component:r,to:e.href,active:t,leftSection:(0,j.jsx)(e.icon,{size:18}),variant:`light`,style:{borderRadius:a.radius.sm,justifyContent:`center`,padding:`8px 0`},styles:{section:{marginRight:0},body:{display:`none`}}})})},e.href):(0,j.jsx)(M,{px:6,py:1,children:(0,j.jsx)(Kpe,{component:r,to:e.href,label:e.label,leftSection:(0,j.jsx)(e.icon,{size:16}),active:t,variant:`light`,style:{borderRadius:a.radius.sm,fontSize:13}})},e.href)})]},t))}),n&&(0,j.jsxs)(M,{className:vx.noShrink,px:6,py:4,children:[(0,j.jsx)(My,{mx:`sm`,mb:4}),n]}),(0,j.jsxs)(M,{className:vx.noShrink,children:[(0,j.jsx)(My,{mx:`sm`}),(0,j.jsxs)(xh,{gap:2,px:6,py:4,children:[(0,j.jsx)(jy,{label:i(`sidebar.refreshMetadata`),position:`right`,disabled:!l,children:(0,j.jsxs)(kd,{onClick:()=>s(),disabled:c,px:l?0:10,py:8,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`flex-start`,gap:10,borderRadius:6,color:`var(--mantine-color-dimmed)`,opacity:c?.5:1},children:[(0,j.jsx)(Ob,{size:18,style:c?{animation:`spin 1s linear infinite`}:void 0}),!l&&(0,j.jsx)(R,{size:`sm`,children:i(`sidebar.refresh`)})]})}),(0,j.jsx)(jy,{label:i(d===`dark`?`sidebar.switchToLight`:`sidebar.switchToDark`),position:`right`,children:(0,j.jsxs)(kd,{onClick:()=>f(),px:l?0:10,py:8,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`flex-start`,gap:10,borderRadius:6,color:`var(--mantine-color-dimmed)`},children:[d===`dark`?(0,j.jsx)(ehe,{size:18}):(0,j.jsx)(Ume,{size:18}),!l&&(0,j.jsx)(R,{size:`sm`,children:i(d===`dark`?`sidebar.lightMode`:`sidebar.darkMode`)})]})}),(0,j.jsx)(jy,{label:i(l?`sidebar.expand`:`sidebar.collapse`),position:`right`,disabled:!l,children:(0,j.jsxs)(kd,{onClick:()=>u(!l),px:l?0:10,py:8,style:{display:`flex`,alignItems:`center`,justifyContent:l?`center`:`flex-start`,gap:10,borderRadius:6,color:`var(--mantine-color-dimmed)`},children:[l?(0,j.jsx)(Cb,{size:18}):(0,j.jsx)(Sb,{size:18}),!l&&(0,j.jsx)(R,{size:`sm`,children:i(`sidebar.collapse`)})]})})]})]})]})},Phe=()=>{let{meta:e}=_x(),t=Cy();return(0,j.jsx)(gx,{actions:(0,A.useMemo)(()=>{let n=[];if(e.functions?.forEach(e=>{n.push({id:`fn-${e.pikkuFuncId}`,label:e.pikkuFuncId,description:`Function`,leftSection:(0,j.jsx)(Pb,{size:16}),onClick:()=>t(`/functions`)})}),e.workflows)for(let[r]of Object.entries(e.workflows))n.push({id:`wf-${r}`,label:r,description:`Workflow`,leftSection:(0,j.jsx)(fb,{size:16}),onClick:()=>t(`/workflow?id=${encodeURIComponent(r)}`)});if(e.httpMeta?.forEach(e=>{let r=`${e.method?.toUpperCase()} ${e.route}`;n.push({id:`http-${r}`,label:r,description:`HTTP → ${e.pikkuFuncId||``}`,leftSection:(0,j.jsx)(mb,{size:16}),onClick:()=>t(`/apis?tab=http`)})}),e.channelsMeta)for(let[r]of Object.entries(e.channelsMeta))n.push({id:`ch-${r}`,label:r,description:`Channel`,leftSection:(0,j.jsx)(Db,{size:16}),onClick:()=>t(`/apis?tab=channels`)});if(e.mcpMeta?.forEach(e=>{n.push({id:`mcp-${e.wireId||e.name}`,label:e.name||e.wireId,description:`MCP ${e.method||``}`,leftSection:(0,j.jsx)(cb,{size:16}),onClick:()=>t(`/apis?tab=mcp`)})}),e.cliMeta?.forEach(e=>{let r=(i,a)=>{if(i)for(let[o,s]of Object.entries(i)){let i=a?`${a} ${o}`:o;s.pikkuFuncId&&n.push({id:`cli-${e.wireId}-${i}`,label:`${e.wireId} ${i}`,description:`CLI → ${s.pikkuFuncId}`,leftSection:(0,j.jsx)(Fb,{size:16}),onClick:()=>t(`/apis?tab=cli`)}),s.subcommands&&r(s.subcommands,i)}};r(e.commands,``)}),e.schedulerMeta)for(let[r,i]of Object.entries(e.schedulerMeta))n.push({id:`sched-${r}`,label:r,description:`Scheduler${i.schedule?` (${i.schedule})`:``}`,leftSection:(0,j.jsx)(ob,{size:16}),onClick:()=>t(`/jobs?tab=schedulers`)});if(e.queueMeta)for(let[r]of Object.entries(e.queueMeta))n.push({id:`queue-${r}`,label:r,description:`Queue Worker`,leftSection:(0,j.jsx)(yb,{size:16}),onClick:()=>t(`/jobs?tab=queues`)});if(e.agentsMeta)for(let[r,i]of Object.entries(e.agentsMeta))n.push({id:`agent-${r}`,label:r,description:`Agent${i.model?` (${i.model})`:``}`,leftSection:(0,j.jsx)($y,{size:16}),onClick:()=>t(`/agents`)});return n},[e,t]),nothingFound:`No results found`,searchProps:{placeholder:`Search functions, routes, workflows...`},shortcut:[`mod + K`],highlightQuery:!0})};function Fhe(e,t){let n=e.toLowerCase();return n.includes(`fetch`)||n.includes(`network`)||n.includes(`econnrefused`)||n.includes(`failed to fetch`)?{titleKey:`connection.errors.connection_refused`,hint:`Make sure your Pikku server is running at ${t}`}:n.includes(`404`)||n.includes(`not found`)||n.includes(`rpc function`)?{titleKey:`connection.errors.addon_not_found`,hint:`The @pikku/addon-console package may not be installed. Add it to your project and run pikku to generate the bootstrap.`}:n.includes(`cors`)||n.includes(`cross-origin`)?{titleKey:`connection.errors.cors_error`,hint:`Your Pikku server may need CORS configured to allow requests from the console origin.`}:n.includes(`timeout`)?{titleKey:`connection.errors.timeout`,hint:`The server took too long to respond. Check if it is under heavy load or unreachable.`}:{titleKey:`connection.errors.connection_failed`,hint:e}}const Ihe=({error:e})=>{let{t}=qy(),[n,r]=(0,A.useState)(my),i=Fhe(e,n);return(0,j.jsx)(Wf,{h:`100vh`,children:(0,j.jsx)(Md,{p:`xl`,radius:`lg`,maw:420,w:`100%`,withBorder:!0,children:(0,j.jsxs)(xh,{gap:`lg`,align:`center`,children:[(0,j.jsxs)(M,{children:[(0,j.jsx)(Wf,{children:(0,j.jsx)(`img`,{src:`/pikku-console-logo.png`,alt:`Pikku Console`,width:48,height:48})}),(0,j.jsx)(R,{size:`xl`,fw:500,ta:`center`,mt:`xs`,children:t(`connection.title`)})]}),(0,j.jsx)(Fy,{icon:(0,j.jsx)(Ib,{size:16}),color:`red`,variant:`light`,title:t(i.titleKey),w:`100%`,children:(0,j.jsx)(R,{size:`sm`,children:z(i.hint)})}),(0,j.jsx)(Iy,{label:t(`connection.server_url_label`),value:n,onChange:e=>r(e.currentTarget.value),w:`100%`}),(0,j.jsx)(Dy,{fullWidth:!0,variant:`default`,onClick:()=>{Bpe(n.trim()),window.location.reload()},children:t(`connection.reconnect`)})]})})})};var Lhe=({children:e,sidebar:t})=>{let{loading:n,error:r}=_x(),[i]=Do({key:`sidebar-collapsed`,defaultValue:!1}),a=i?60:210;return n?(0,j.jsx)(Wf,{h:`100vh`,children:(0,j.jsx)(Hd,{size:`lg`})}):r?(0,j.jsx)(Ihe,{error:r}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Phe,{}),(0,j.jsx)(xx,{...t}),(0,j.jsx)(M,{ml:a,h:`100vh`,style:{transition:`margin-left 200ms ease`},children:e})]})};const Rhe=({children:e,sidebar:t})=>(0,j.jsx)(jhe,{children:(0,j.jsx)(Lhe,{sidebar:t,children:e})});var Sx={root:`_root_2wiyz_1`,label:`_label_2wiyz_6`,description:`_description_2wiyz_19`,title:`_title_2wiyz_26`};const Cx=()=>{let e=Cy(),{t}=qy();return(0,j.jsxs)(up,{className:Sx.root,children:[(0,j.jsx)(`div`,{className:Sx.label,children:`404`}),(0,j.jsx)(qpe,{className:Sx.title,children:t(`not_found.title`)}),(0,j.jsx)(R,{c:`dimmed`,size:`lg`,ta:`center`,className:Sx.description,children:t(`not_found.description`)}),(0,j.jsx)(Kd,{justify:`center`,children:(0,j.jsx)(Dy,{variant:`subtle`,size:`md`,onClick:()=>{e(`/`)},children:t(`not_found.go_home`)})})]})};var zhe=({href:e})=>{let{t}=qy();return(0,j.jsx)(jy,{label:t(`common.docs_link`),children:(0,j.jsx)(Dy,{component:`a`,href:e,target:`_blank`,rel:`noopener noreferrer`,variant:`default`,color:`gray`,size:`xs`,px:`xs`,children:(0,j.jsx)(kme,{size:14})})})};const wx=(0,A.createContext)(null);function Bhe(){return(0,A.useContext)(wx)}function Tx({title:e,description:t,docsHref:n,lead:r,filters:i,view:a}){let o=n?(0,j.jsx)(zhe,{href:n}):null,s=(0,j.jsxs)(xh,{gap:2,style:{minWidth:0,flex:1},children:[(0,j.jsx)(R,{fw:600,size:`xl`,c:`var(--app-text)`,truncate:!0,style:{minWidth:0},children:e}),t!=null&&(typeof t==`string`?(0,j.jsx)(R,{size:`md`,c:`dimmed`,children:t}):(0,j.jsx)(R,{size:`md`,c:`dimmed`,component:`div`,children:t}))]});return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(Kd,{justify:`space-between`,align:`center`,wrap:`nowrap`,gap:`md`,visibleFrom:`lg`,children:[s,i&&(0,j.jsx)(Kd,{gap:`sm`,wrap:`nowrap`,style:{flexShrink:0},children:i}),a&&(0,j.jsx)(Kd,{gap:`xs`,wrap:`nowrap`,style:{flexShrink:0},children:a}),r&&(0,j.jsx)(Kd,{gap:`xs`,wrap:`nowrap`,style:{flexShrink:0},children:r}),o]}),(0,j.jsxs)(xh,{gap:`xs`,hiddenFrom:`lg`,children:[(0,j.jsxs)(Kd,{justify:`space-between`,align:`center`,wrap:`nowrap`,gap:`md`,children:[s,(0,j.jsxs)(Kd,{gap:`xs`,wrap:`nowrap`,style:{flexShrink:0},children:[r,o]})]}),(i||a)&&(0,j.jsx)(Vhe,{filters:i,view:a})]})]})}function Ex({children:e,style:t,fullWidth:n=!1,noPadding:r=!1,header:i,contentGap:a,emptyState:o,loading:s,...c}){let l=Bhe(),u=s??o??l??e,d=i?(0,j.jsxs)(xh,{gap:a??`md`,style:{flex:1,minWidth:0,minHeight:0},children:[i,u]}):u;return(0,j.jsx)(up,{size:n?void 0:`lg`,fluid:n,py:r?0:`xl`,px:r?0:`xl`,...c,style:{flex:1,display:`flex`,flexDirection:`column`,width:`100%`,minWidth:0,minHeight:0,...t},children:d})}function Vhe({lead:e,view:t,filters:n}){return!e&&!t&&!n?null:(0,j.jsxs)(Kd,{gap:`sm`,wrap:`nowrap`,align:`center`,style:{width:`100%`,minWidth:0},children:[e&&(0,j.jsx)(Kd,{gap:`xs`,wrap:`nowrap`,align:`center`,style:{flexShrink:0},children:e}),e?(0,j.jsxs)(Kd,{gap:`sm`,wrap:`nowrap`,align:`center`,style:{marginLeft:`auto`,flexShrink:0},children:[n,t]}):(0,j.jsxs)(j.Fragment,{children:[n,t&&(0,j.jsx)(Kd,{gap:`sm`,wrap:`nowrap`,align:`center`,style:{marginLeft:`auto`},children:t})]})]})}var Hhe=({label:e,count:t,icon:n,href:r})=>(0,j.jsx)(Md,{component:Sy(),to:r,p:`md`,radius:`md`,withBorder:!0,style:{textDecoration:`none`,color:`inherit`,transition:`box-shadow 150ms ease, transform 150ms ease`,cursor:`pointer`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`var(--mantine-shadow-md)`,e.currentTarget.style.transform=`translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=``,e.currentTarget.style.transform=``},children:(0,j.jsxs)(Kd,{gap:`md`,wrap:`nowrap`,children:[(0,j.jsx)(M,{style:{width:40,height:40,borderRadius:8,backgroundColor:`rgba(255,255,255,0.04)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--mantine-color-dimmed)`},children:(0,j.jsx)(n,{size:20})}),(0,j.jsxs)(xh,{gap:0,children:[(0,j.jsx)(R,{size:`xl`,fw:700,children:t}),(0,j.jsx)(R,{size:`sm`,c:`dimmed`,children:e})]})]})});const Uhe=()=>{let{t:e}=qy(),{counts:t,loading:n}=_x();if(n)return(0,j.jsx)(Wf,{h:`100vh`,children:(0,j.jsx)(Hd,{})});let r=[{label:e(`overview.functions`),count:t.functions,icon:Pb,href:`/functions`},{label:e(`overview.workflows`),count:t.workflows,icon:fb,href:`/workflow`},{label:e(`overview.agents`),count:t.agents,icon:$y,href:`/agents`},{label:e(`overview.http_routes`),count:t.httpRoutes,icon:mb,href:`/apis?tab=http`},{label:e(`overview.channels`),count:t.channels,icon:Db,href:`/apis?tab=channels`},{label:e(`overview.mcp_tools`),count:t.mcpTools,icon:cb,href:`/apis?tab=mcp`},{label:e(`overview.cli_commands`),count:t.cliCommands,icon:Fb,href:`/apis?tab=cli`},{label:e(`overview.schedulers`),count:t.schedulers,icon:ob,href:`/jobs?tab=schedulers`},{label:e(`overview.queues`),count:t.queues,icon:yb,href:`/jobs?tab=queues`},{label:e(`overview.emails`),count:t.emails,icon:bb,href:`/emails`}];return(0,j.jsxs)(Ex,{children:[(0,j.jsx)(Tx,{title:e(`overview.title`),description:e(`overview.description`)}),(0,j.jsx)(dh,{cols:{base:1,xs:2,sm:3,md:4},spacing:`md`,children:r.map(e=>(0,j.jsx)(Hhe,{...e},String(e.label)))})]})};function Whe(e){return e.replace(/([A-Z])/g,` $1`).replace(/^(.)/,e=>e.toUpperCase()).trim()}var Ghe=(0,A.createContext)(void 0);const Dx=()=>{let e=(0,A.useContext)(Ghe);if(!e)throw Error(`usePanelContext must be used within PanelProvider`);return e},Ox=({children:e})=>{let[t,n]=(0,A.useState)(new Map),[r,i]=(0,A.useState)(null),a=(0,A.useCallback)((e,t,r,a)=>{let o=`${e}-${t}`;n(n=>{let i=new Map(n);return i.set(o,{id:o,title:r,data:{type:e,id:t,metadata:a},activeChildId:`configuration`,history:[]}),i}),i(o)},[]),o=(0,A.useCallback)((e,t)=>{a(`function`,e,t?.displayName||Whe(e),t)},[a]),s=(0,A.useCallback)((e,t)=>{a(`http`,e,e,t)},[a]),c=(0,A.useCallback)((e,t)=>{a(`channel`,e,e,t)},[a]),l=(0,A.useCallback)((e,t)=>{a(`rpc`,e,e,t)},[a]),u=(0,A.useCallback)((e,t)=>{a(`scheduler`,e,e,t)},[a]),d=(0,A.useCallback)((e,t)=>{a(`queue`,e,e,t)},[a]),f=(0,A.useCallback)((e,t)=>{a(`cli`,e,e,t)},[a]),p=(0,A.useCallback)((e,t)=>{a(`mcp`,e,e,t)},[a]),m=(0,A.useCallback)((e,t,n)=>{a(`workflowStep`,e,n?.stepName||n?.title||`${t} Step`,{...n,stepType:t})},[a]),h=(0,A.useCallback)((e,t)=>{a(`workflow`,e,t?.name||e,t)},[a]),g=(0,A.useCallback)((e,t)=>{a(`trigger`,e,e,t)},[a]),_=(0,A.useCallback)((e,t)=>{a(`triggerSource`,e,e,t)},[a]),v=(0,A.useCallback)((e,t)=>{a(`middleware`,e,t?.name||t?.exportedName||e,t)},[a]),y=(0,A.useCallback)((e,t)=>{a(`permission`,e,t?.name||t?.exportedName||e,t)},[a]),b=(0,A.useCallback)((e,t)=>{a(`agent`,e,t?.name||e,t)},[a]),x=(0,A.useCallback)((e,t)=>{a(`secret`,e,t?.displayName||e,t)},[a]),S=(0,A.useCallback)((e,t)=>{a(`variable`,e,t?.displayName||e,t)},[a]),C=(0,A.useCallback)((e,t)=>{a(`credentialUser`,e,`User: ${e}`,t)},[a]),w=(0,A.useCallback)((e,t)=>{a(`authProvider`,e,t?.name||e,t)},[a]),T=(0,A.useCallback)((e,t,n)=>{a(`dbColumn`,`${e}.${t}`,t,{...n,tableName:e,columnName:t})},[a]),E=(0,A.useCallback)((e,t,i,a)=>{n(n=>{let o=Array.from(n.keys()).find(e=>e===r);if(!o)return n;let s=n.get(o);if(!s)return n;let c=new Map(n);return c.set(o,{...s,history:[...s.history,{title:s.title,data:s.data}],title:i,data:{type:e,id:t,metadata:a}}),c})},[r]),D=(0,A.useCallback)(()=>{n(e=>{if(!r)return e;let t=e.get(r);if(!t||t.history.length===0)return e;let n=[...t.history],i=n.pop(),a=new Map(e);return a.set(r,{...t,history:n,title:i.title,data:i.data}),a})},[r]),O=(0,A.useCallback)(e=>{n(t=>{if(!r)return t;let n=t.get(r);if(!n||e<0||e>=n.history.length)return t;let i=n.history[e],a=new Map(t);return a.set(r,{...n,history:n.history.slice(0,e),title:i.title,data:i.data}),a})},[r]),k=(0,A.useCallback)(e=>{n(t=>{let n=new Map(t);return n.delete(e),n}),i(n=>{if(n===e){let n=Array.from(t.keys()).filter(t=>t!==e);return n.length>0?n[0]:null}return n})},[t]),ee=(0,A.useCallback)(e=>{i(e)},[]),te=(0,A.useCallback)((e,t)=>{n(n=>{let r=new Map(n),i=r.get(e);return i&&r.set(e,{...i,activeChildId:t}),r})},[]);return(0,j.jsx)(Ghe.Provider,{value:{panels:t,activePanel:r,openFunction:o,openHTTPWire:s,openChannel:c,openRPC:l,openScheduler:u,openQueue:d,openCLI:f,openMCP:p,openWorkflowStep:m,openWorkflow:h,openTrigger:g,openTriggerSource:_,openMiddleware:v,openPermission:y,openAgent:b,openSecret:x,openVariable:S,openCredentialUser:C,openAuthProvider:w,openDbColumn:T,navigateInPanel:E,goBack:D,goBackTo:O,closePanel:k,setActivePanel:ee,setActiveChild:te},children:e})},Khe={GET:{color:`cyan`,label:`GET`},POST:{color:`violet`,label:`POST`},PUT:{color:`yellow`,label:`PUT`},PATCH:{color:`orange`,label:`PATCH`},DELETE:{color:`red`,label:`DEL`},HEAD:{color:`gray`,label:`HEAD`},OPTIONS:{color:`gray`,label:`OPTIONS`}},qhe={resource:{color:`blue`,label:`resource`},tool:{color:`orange`,label:`tool`},prompt:{color:`violet`,label:`prompt`}},kx={pikkuFunc:{label:`Function`,color:`blue`},pikkuSessionlessFunc:{label:`Function`,color:`blue`},pikkuVoidFunc:{label:`Void`,color:`gray`},pikkuChannelFunc:{label:`Channel`,color:`cyan`},pikkuChannelConnectionFunc:{label:`Channel Connect`,color:`cyan`},pikkuChannelDisconnectionFunc:{label:`Channel Disconnect`,color:`cyan`},pikkuMCPResourceFunc:{label:`MCP Resource`,color:`orange`},pikkuMCPToolFunc:{label:`MCP Tool`,color:`orange`},pikkuMCPPromptFunc:{label:`MCP Prompt`,color:`orange`},pikkuTriggerFunc:{label:`Trigger Source`,color:`yellow`},pikkuWorkflowFunc:{label:`Workflow`,color:`violet`}},Jhe={http:{color:`green`,label:`HTTP`},channel:{color:`cyan`,label:`Channel`},mcp:{color:`orange`,label:`MCP`},cli:{color:`teal`,label:`CLI`},rpc:{color:`indigo`,label:`RPC`},scheduler:{color:`yellow`,label:`Scheduler`},queue:{color:`pink`,label:`Queue`},trigger:{color:`red`,label:`Trigger`},triggerSource:{color:`grape`,label:`Trigger Source`},agent:{color:`grape`,label:`Agent`}},Yhe={string:{color:`green`,label:`string`},number:{color:`blue`,label:`number`},integer:{color:`blue`,label:`integer`},boolean:{color:`orange`,label:`boolean`},array:{color:`violet`,label:`array`},object:{color:`cyan`,label:`object`},enum:{color:`pink`,label:`enum`}},Xhe={$ref:{color:`blue`,label:`$ref`},$trigger:{color:`green`,label:`$trigger`},$state:{color:`violet`,label:`$state`},$template:{color:`orange`,label:`$template`},$static:{color:`gray`,label:`$static`},$expression:{color:`cyan`,label:`$expression`}},Zhe={auth:{color:`red`,label:`Auth`,icon:Vme},permissioned:{color:`red`,label:`Permissioned`,icon:Nb},exposed:{color:`green`,label:`Exposed`,icon:mb},internal:{color:`gray`,label:`Internal`,icon:Ame},session:{color:`yellow`,label:`Session`,icon:Vme},factory:{color:`violet`,label:`Factory`,icon:jme},factoryCall:{color:`violet`,label:`factory call`},local:{color:`orange`,label:`Local`},required:{color:`red`,label:`required`},sse:{color:`cyan`,label:`SSE`}},Qhe={running:{color:`blue`,label:`running`},completed:{color:`green`,label:`completed`},succeeded:{color:`green`,label:`succeeded`},failed:{color:`red`,label:`failed`},pending:{color:`gray`,label:`pending`},scheduled:{color:`orange`,label:`scheduled`},skipped:{color:`gray`,label:`skipped`},cancelled:{color:`gray`,label:`cancelled`}},$he={route:{variant:`outline`},param:{color:`blue`,variant:`outline`},query:{color:`green`,variant:`outline`},error:{color:`red`,variant:`outline`},schedule:{color:`yellow`,variant:`light`},concurrency:{color:`pink`,variant:`light`,prefix:`concurrency: `},steps:{variant:`outline`,suffix:` step`,pluralSuffix:` steps`},wirings:{color:`gray`,variant:`light`,suffix:` wiring`,pluralSuffix:` wirings`},functions:{variant:`outline`,suffix:` function`,pluralSuffix:` functions`},tag:{variant:`dot`},service:{color:`gray`,variant:`light`,icon:jb},package:{color:`teal`,variant:`light`,icon:xb},exportedName:{color:`gray`,variant:`outline`},nodes:{variant:`light`,suffix:` node`,pluralSuffix:` nodes`},middleware:{color:`orange`,variant:`light`,icon:_b},permission:{color:`red`,variant:`light`,icon:Nb},source:{color:`violet`,variant:`light`},handlers:{color:`cyan`,variant:`outline`,suffix:` handler`,pluralSuffix:` handlers`},actions:{color:`teal`,variant:`outline`,suffix:` action`,pluralSuffix:` actions`},tool:{color:`blue`,variant:`outline`},agent:{color:`grape`,variant:`outline`},agents:{color:`grape`,variant:`outline`,suffix:` agent`,pluralSuffix:` agents`},tools:{color:`blue`,variant:`outline`,suffix:` tool`,pluralSuffix:` tools`},maxSteps:{color:`gray`,variant:`outline`,prefix:`max `,suffix:` step`,pluralSuffix:` steps`},toolChoice:{color:`gray`,variant:`outline`,prefix:`tool: `},storage:{color:`gray`,variant:`outline`,prefix:`storage: `},lastMessages:{color:`gray`,variant:`outline`,prefix:`last `,suffix:` msg`,pluralSuffix:` msgs`},model:{color:`violet`,variant:`light`},format:{color:`gray`,variant:`outline`},wire:{color:`cyan`,variant:`outline`}},ege=e=>Jhe[e]?.color||`gray`,tge=e=>Yhe[e]?.color||`gray`;var Ax={xs:8,sm:10,md:12,lg:14,xl:16},nge={httpMethod:Khe,mcpType:qhe,funcWrapper:kx,wiringType:Jhe,schemaType:Yhe,workflowInputType:Xhe,status:Qhe},jx=e=>e.includes(`/`)?e:e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[_-]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),rge=({icon:e,size:t,color:n})=>(0,j.jsx)(`span`,{style:{color:`var(--mantine-color-${n}-6)`,display:`flex`},children:(0,j.jsx)(e,{size:t})});const Mx=e=>{let{type:t,size:n,...r}=e,i=n||`md`,a=Ax[i]||10;if(t===`label`){let{children:e,color:t,variant:n,...a}=r;return(0,j.jsx)(ky,{size:i,tt:`none`,variant:n||`light`,color:t||`gray`,...a,children:e})}if(t===`flag`){let{flag:e,...t}=r,n=Zhe[e];if(!n)return null;let o=n.icon;return(0,j.jsx)(ky,{size:i,tt:`none`,variant:`light`,color:n.color||`gray`,className:vx.noShrink,leftSection:o?(0,j.jsx)(rge,{icon:o,size:a,color:n.color}):void 0,...t,children:z(n.label)})}if(t===`dynamic`){let{badge:e,value:t,...n}=r,o=$he[e];if(!o)return null;let s=o.icon,c;return c=o.pluralSuffix&&typeof t==`number`?`${t}${t===1&&o.suffix||o.pluralSuffix}`:`${o.prefix||``}${t}${o.suffix||``}`,(0,j.jsx)(ky,{size:i,tt:`none`,variant:`light`,color:o.color||`gray`,className:vx.noShrink,leftSection:s?(0,j.jsx)(rge,{icon:s,size:a,color:o.color||`gray`}):void 0,...n,children:z(jx(c))})}let{value:o,...s}=r,c=nge[t]?.[o],l=c?.label||o;return(0,j.jsx)(ky,{size:i,tt:`none`,variant:`light`,color:c?.color||`gray`,className:vx.noShrink,...s,children:z(jx(l))})};function Nx(e){return typeof e!=`object`||!e||typeof e.lastModified==`number`&&typeof File<`u`&&e instanceof File||typeof e.getMonth==`function`&&typeof Date<`u`&&e instanceof Date?!1:!Array.isArray(e)}function ige(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),Nx(e.additionalItems)}function age(e){if(e===``)return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)?t:e}const Px=`__additional_property`,oge=`allOf`,Fx=`anyOf`,Ix=`const`,sge=`default`,Lx=`__errors`,Rx=`items`,cge=`$name`,zx=`oneOf`,Bx=`properties`,lge=`readonly`,uge=`submitButtonOptions`,Vx=`$ref`,Hx=`root`,dge=[`discriminator`,`propertyName`],Ux=`__rjsf_additionalProperties`,fge=`__rjsf_rootSchema`,Wx=`ui:options`,Gx=`ui:globalOptions`;function Kx(e={},t={}){return e?Object.keys(e).filter(e=>e.indexOf(`ui:`)===0).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&Nx(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&Nx(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function pge(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=Kx(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var mge=typeof global==`object`&&global&&global.Object===Object&&global,hge=typeof self==`object`&&self&&self.Object===Object&&self,qx=mge||hge||Function(`return this`)(),Jx=qx.Symbol,Yx=Object.prototype,V=Yx.hasOwnProperty,Xx=Yx.toString,Zx=Jx?Jx.toStringTag:void 0;function gge(e){var t=V.call(e,Zx),n=e[Zx];try{e[Zx]=void 0;var r=!0}catch{}var i=Xx.call(e);return r&&(t?e[Zx]=n:delete e[Zx]),i}var Qx=gge,$x=Object.prototype.toString;function _ge(e){return $x.call(e)}var vge=_ge,yge=`[object Null]`,bge=`[object Undefined]`,xge=Jx?Jx.toStringTag:void 0;function Sge(e){return e==null?e===void 0?bge:yge:xge&&xge in Object(e)?Qx(e):vge(e)}var eS=Sge;function Cge(e,t){return function(n){return e(t(n))}}var wge=Cge,tS=wge(Object.getPrototypeOf,Object);function Tge(e){return typeof e==`object`&&!!e}var nS=Tge,Ege=`[object Object]`,Dge=Function.prototype,Oge=Object.prototype,kge=Dge.toString,Age=Oge.hasOwnProperty,jge=kge.call(Object);function Mge(e){if(!nS(e)||eS(e)!=Ege)return!1;var t=tS(e);if(t===null)return!0;var n=Age.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&kge.call(n)==jge}var rS=Mge;function iS(e){let t={[Lx]:[],addError(e){this[Lx].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:iS(t)}),t);if(rS(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:iS(n[t])}),t)}return t}function Nge(){this.__data__=[],this.size=0}var Pge=Nge;function aS(e,t){return e===t||e!==e&&t!==t}var oS=aS;function Fge(e,t){for(var n=e.length;n--;)if(oS(e[n][0],t))return n;return-1}var sS=Fge,Ige=Array.prototype.splice;function Lge(e){var t=this.__data__,n=sS(t,e);return n<0?!1:(n==t.length-1?t.pop():Ige.call(t,n,1),--this.size,!0)}var Rge=Lge;function cS(e){var t=this.__data__,n=sS(t,e);return n<0?void 0:t[n][1]}var zge=cS;function Bge(e){return sS(this.__data__,e)>-1}var Vge=Bge;function Hge(e,t){var n=this.__data__,r=sS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var lS=Hge;function uS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uS.prototype.clear=Pge,uS.prototype.delete=Rge,uS.prototype.get=zge,uS.prototype.has=Vge,uS.prototype.set=lS;var dS=uS;function fS(){this.__data__=new dS,this.size=0}var Uge=fS;function Wge(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Gge=Wge;function Kge(e){return this.__data__.get(e)}var qge=Kge;function Jge(e){return this.__data__.has(e)}var pS=Jge;function Yge(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var mS=Yge,Xge=`[object AsyncFunction]`,Zge=`[object Function]`,hS=`[object GeneratorFunction]`,Qge=`[object Proxy]`;function gS(e){if(!mS(e))return!1;var t=eS(e);return t==Zge||t==hS||t==Xge||t==Qge}var _S=gS,$ge=qx[`__core-js_shared__`],e_e=function(){var e=/[^.]+$/.exec($ge&&$ge.keys&&$ge.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function t_e(e){return!!e_e&&e_e in e}var n_e=t_e,r_e=Function.prototype.toString;function i_e(e){if(e!=null){try{return r_e.call(e)}catch{}try{return e+``}catch{}}return``}var vS=i_e,a_e=/[\\^$.*+?()[\]{}|]/g,o_e=/^\[object .+?Constructor\]$/,s_e=Function.prototype,c_e=Object.prototype,l_e=s_e.toString,u_e=c_e.hasOwnProperty,d_e=RegExp(`^`+l_e.call(u_e).replace(a_e,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function f_e(e){return!mS(e)||n_e(e)?!1:(_S(e)?d_e:o_e).test(vS(e))}var p_e=f_e;function yS(e,t){return e?.[t]}var bS=yS;function xS(e,t){var n=bS(e,t);return p_e(n)?n:void 0}var SS=xS,CS=SS(qx,`Map`),wS=SS(Object,`create`);function m_e(){this.__data__=wS?wS(null):{},this.size=0}var TS=m_e;function ES(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var h_e=ES,g_e=`__lodash_hash_undefined__`,__e=Object.prototype.hasOwnProperty;function v_e(e){var t=this.__data__;if(wS){var n=t[e];return n===g_e?void 0:n}return __e.call(t,e)?t[e]:void 0}var y_e=v_e,b_e=Object.prototype.hasOwnProperty;function DS(e){var t=this.__data__;return wS?t[e]!==void 0:b_e.call(t,e)}var x_e=DS,S_e=`__lodash_hash_undefined__`;function C_e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=wS&&t===void 0?S_e:t,this}var w_e=C_e;function OS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}OS.prototype.clear=TS,OS.prototype.delete=h_e,OS.prototype.get=y_e,OS.prototype.has=x_e,OS.prototype.set=w_e;var T_e=OS;function E_e(){this.size=0,this.__data__={hash:new T_e,map:new(CS||dS),string:new T_e}}var D_e=E_e;function O_e(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var kS=O_e;function k_e(e,t){var n=e.__data__;return kS(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var AS=k_e;function A_e(e){var t=AS(this,e).delete(e);return this.size-=t?1:0,t}var j_e=A_e;function M_e(e){return AS(this,e).get(e)}var N_e=M_e;function P_e(e){return AS(this,e).has(e)}var F_e=P_e;function I_e(e,t){var n=AS(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var L_e=I_e;function jS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}jS.prototype.clear=D_e,jS.prototype.delete=j_e,jS.prototype.get=N_e,jS.prototype.has=F_e,jS.prototype.set=L_e;var R_e=jS,z_e=200;function B_e(e,t){var n=this.__data__;if(n instanceof dS){var r=n.__data__;if(!CS||r.length<z_e-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new R_e(r)}return n.set(e,t),this.size=n.size,this}var V_e=B_e;function MS(e){this.size=(this.__data__=new dS(e)).size}MS.prototype.clear=Uge,MS.prototype.delete=Gge,MS.prototype.get=qge,MS.prototype.has=pS,MS.prototype.set=V_e;var NS=MS,H_e=`__lodash_hash_undefined__`;function U_e(e){return this.__data__.set(e,H_e),this}var W_e=U_e;function PS(e){return this.__data__.has(e)}var G_e=PS;function K_e(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new R_e;++t<n;)this.add(e[t])}K_e.prototype.add=K_e.prototype.push=W_e,K_e.prototype.has=G_e;var q_e=K_e;function J_e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Y_e=J_e;function X_e(e,t){return e.has(t)}var FS=X_e,Z_e=1,Q_e=2;function $_e(e,t,n,r,i,a){var o=n&Z_e,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Q_e?new q_e:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Y_e(t,function(e,t){if(!FS(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var eve=$_e,IS=qx.Uint8Array;function LS(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var tve=LS;function nve(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var RS=nve,rve=1,zS=2,ive=`[object Boolean]`,ave=`[object Date]`,ove=`[object Error]`,sve=`[object Map]`,cve=`[object Number]`,lve=`[object RegExp]`,uve=`[object Set]`,dve=`[object String]`,fve=`[object Symbol]`,pve=`[object ArrayBuffer]`,mve=`[object DataView]`,hve=Jx?Jx.prototype:void 0,BS=hve?hve.valueOf:void 0;function gve(e,t,n,r,i,a,o){switch(n){case mve:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pve:return!(e.byteLength!=t.byteLength||!a(new IS(e),new IS(t)));case ive:case ave:case cve:return oS(+e,+t);case ove:return e.name==t.name&&e.message==t.message;case lve:case dve:return e==t+``;case sve:var s=tve;case uve:var c=r&rve;if(s||=RS,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=zS,o.set(e,t);var u=eve(s(e),s(t),r,i,a,o);return o.delete(e),u;case fve:if(BS)return BS.call(e)==BS.call(t)}return!1}var VS=gve;function _ve(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var vve=_ve,HS=Array.isArray;function yve(e,t,n){var r=t(e);return HS(e)?r:vve(r,n(e))}var bve=yve;function xve(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var Sve=xve;function US(){return[]}var WS=US,Cve=Object.prototype.propertyIsEnumerable,wve=Object.getOwnPropertySymbols,GS=wve?function(e){return e==null?[]:(e=Object(e),Sve(wve(e),function(t){return Cve.call(e,t)}))}:WS;function Tve(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Eve=Tve,Dve=`[object Arguments]`;function Ove(e){return nS(e)&&eS(e)==Dve}var kve=Ove,Ave=Object.prototype,jve=Ave.hasOwnProperty,Mve=Ave.propertyIsEnumerable,KS=kve(function(){return arguments}())?kve:function(e){return nS(e)&&jve.call(e,`callee`)&&!Mve.call(e,`callee`)};function Nve(){return!1}var Pve=Nve,Fve=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Ive=Fve&&typeof module==`object`&&module&&!module.nodeType&&module,Lve=Ive&&Ive.exports===Fve?qx.Buffer:void 0,qS=(Lve?Lve.isBuffer:void 0)||Pve,Rve=9007199254740991,zve=/^(?:0|[1-9]\d*)$/;function Bve(e,t){var n=typeof e;return t??=Rve,!!t&&(n==`number`||n!=`symbol`&&zve.test(e))&&e>-1&&e%1==0&&e<t}var Vve=Bve,Hve=9007199254740991;function Uve(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Hve}var Wve=Uve,Gve=`[object Arguments]`,Kve=`[object Array]`,qve=`[object Boolean]`,Jve=`[object Date]`,Yve=`[object Error]`,Xve=`[object Function]`,Zve=`[object Map]`,Qve=`[object Number]`,$ve=`[object Object]`,eye=`[object RegExp]`,tye=`[object Set]`,nye=`[object String]`,rye=`[object WeakMap]`,iye=`[object ArrayBuffer]`,aye=`[object DataView]`,oye=`[object Float32Array]`,sye=`[object Float64Array]`,cye=`[object Int8Array]`,lye=`[object Int16Array]`,uye=`[object Int32Array]`,dye=`[object Uint8Array]`,fye=`[object Uint8ClampedArray]`,pye=`[object Uint16Array]`,mye=`[object Uint32Array]`,JS={};JS[oye]=JS[sye]=JS[cye]=JS[lye]=JS[uye]=JS[dye]=JS[fye]=JS[pye]=JS[mye]=!0,JS[Gve]=JS[Kve]=JS[iye]=JS[qve]=JS[aye]=JS[Jve]=JS[Yve]=JS[Xve]=JS[Zve]=JS[Qve]=JS[$ve]=JS[eye]=JS[tye]=JS[nye]=JS[rye]=!1;function hye(e){return nS(e)&&Wve(e.length)&&!!JS[eS(e)]}var gye=hye;function _ye(e){return function(t){return e(t)}}var YS=_ye,vye=typeof exports==`object`&&exports&&!exports.nodeType&&exports,XS=vye&&typeof module==`object`&&module&&!module.nodeType&&module,yye=XS&&XS.exports===vye&&mge.process,ZS=function(){try{return XS&&XS.require&&XS.require(`util`).types||yye&&yye.binding&&yye.binding(`util`)}catch{}}(),bye=ZS&&ZS.isTypedArray,QS=bye?YS(bye):gye,xye=Object.prototype.hasOwnProperty;function Sye(e,t){var n=HS(e),r=!n&&KS(e),i=!n&&!r&&qS(e),a=!n&&!r&&!i&&QS(e),o=n||r||i||a,s=o?Eve(e.length,String):[],c=s.length;for(var l in e)(t||xye.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Vve(l,c)))&&s.push(l);return s}var Cye=Sye,wye=Object.prototype;function Tye(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||wye)}var Eye=Tye,Dye=wge(Object.keys,Object),Oye=Object.prototype.hasOwnProperty;function kye(e){if(!Eye(e))return Dye(e);var t=[];for(var n in Object(e))Oye.call(e,n)&&n!=`constructor`&&t.push(n);return t}var Aye=kye;function $S(e){return e!=null&&Wve(e.length)&&!_S(e)}var eC=$S;function tC(e){return eC(e)?Cye(e):Aye(e)}var nC=tC;function jye(e){return bve(e,nC,GS)}var Mye=jye,Nye=1,Pye=Object.prototype.hasOwnProperty;function Fye(e,t,n,r,i,a){var o=n&Nye,s=Mye(e),c=s.length;if(c!=Mye(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Pye.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Iye=Fye,Lye=SS(qx,`DataView`),Rye=SS(qx,`Promise`),rC=SS(qx,`Set`),zye=SS(qx,`WeakMap`),Bye=`[object Map]`,Vye=`[object Object]`,Hye=`[object Promise]`,Uye=`[object Set]`,Wye=`[object WeakMap]`,Gye=`[object DataView]`,Kye=vS(Lye),qye=vS(CS),Jye=vS(Rye),Yye=vS(rC),Xye=vS(zye),iC=eS;(Lye&&iC(new Lye(new ArrayBuffer(1)))!=Gye||CS&&iC(new CS)!=Bye||Rye&&iC(Rye.resolve())!=Hye||rC&&iC(new rC)!=Uye||zye&&iC(new zye)!=Wye)&&(iC=function(e){var t=eS(e),n=t==Vye?e.constructor:void 0,r=n?vS(n):``;if(r)switch(r){case Kye:return Gye;case qye:return Bye;case Jye:return Hye;case Yye:return Uye;case Xye:return Wye}return t});var aC=iC,Zye=1,Qye=`[object Arguments]`,$ye=`[object Array]`,ebe=`[object Object]`,tbe=Object.prototype.hasOwnProperty;function nbe(e,t,n,r,i,a){var o=HS(e),s=HS(t),c=o?$ye:aC(e),l=s?$ye:aC(t);c=c==Qye?ebe:c,l=l==Qye?ebe:l;var u=c==ebe,d=l==ebe,f=c==l;if(f&&qS(e)){if(!qS(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new NS,o||QS(e)?eve(e,t,n,r,i,a):VS(e,t,c,n,r,i,a);if(!(n&Zye)){var p=u&&tbe.call(e,`__wrapped__`),m=d&&tbe.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new NS,i(h,g,n,r,a)}}return f?(a||=new NS,Iye(e,t,n,r,i,a)):!1}var rbe=nbe;function ibe(e,t,n,r,i){return e===t?!0:e==null||t==null||!nS(e)&&!nS(t)?e!==e&&t!==t:rbe(e,t,n,r,ibe,i)}var abe=ibe;function obe(e,t,n){n=typeof n==`function`?n:void 0;var r=n?n(e,t):void 0;return r===void 0?abe(e,t,void 0,n):!!r}var sbe=obe;function oC(e,t){return sbe(e,t,(e,t)=>{if(typeof e==`function`&&typeof t==`function`)return!0})}var cbe=`[object Symbol]`;function lbe(e){return typeof e==`symbol`||nS(e)&&eS(e)==cbe}var sC=lbe,ube=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dbe=/^\w*$/;function fbe(e,t){if(HS(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||sC(e)?!0:dbe.test(e)||!ube.test(e)||t!=null&&e in Object(t)}var cC=fbe,lC=`Expected a function`;function pbe(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(lC);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(pbe.Cache||R_e),n}pbe.Cache=R_e;var mbe=pbe,hbe=500;function gbe(e){var t=mbe(e,function(e){return n.size===hbe&&n.clear(),e}),n=t.cache;return t}var _be=gbe,vbe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ybe=/\\(\\)?/g,bbe=_be(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(vbe,function(e,n,r,i){t.push(r?i.replace(ybe,`$1`):n||e)}),t});function xbe(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var uC=xbe,dC=1/0,Sbe=Jx?Jx.prototype:void 0,fC=Sbe?Sbe.toString:void 0;function Cbe(e){if(typeof e==`string`)return e;if(HS(e))return uC(e,Cbe)+``;if(sC(e))return fC?fC.call(e):``;var t=e+``;return t==`0`&&1/e==-dC?`-0`:t}var wbe=Cbe;function Tbe(e){return e==null?``:wbe(e)}var pC=Tbe;function Ebe(e,t){return HS(e)?e:cC(e,t)?[e]:bbe(pC(e))}var mC=Ebe,Dbe=1/0;function Obe(e){if(typeof e==`string`||sC(e))return e;var t=e+``;return t==`0`&&1/e==-Dbe?`-0`:t}var hC=Obe;function gC(e,t){t=mC(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[hC(t[n++])];return n&&n==r?e:void 0}var kbe=gC;function Abe(e,t,n){var r=e==null?void 0:kbe(e,t);return r===void 0?n:r}var _C=Abe,jbe=Object.prototype.hasOwnProperty;function Mbe(e,t){return e!=null&&jbe.call(e,t)}var Nbe=Mbe;function Pbe(e,t,n){t=mC(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=hC(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Wve(i)&&Vve(o,i)&&(HS(e)||KS(e)))}var Fbe=Pbe;function Ibe(e,t){return e!=null&&Fbe(e,t,Nbe)}var vC=Ibe;function Lbe(e,t){return abe(e,t)}var yC=Lbe,Rbe=function(){try{var e=SS(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function zbe(e,t,n){t==`__proto__`&&Rbe?Rbe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var bC=zbe,xC=Object.prototype.hasOwnProperty;function Bbe(e,t,n){var r=e[t];(!(xC.call(e,t)&&oS(r,n))||n===void 0&&!(t in e))&&bC(e,t,n)}var H=Bbe;function SC(e,t,n,r){if(!mS(e))return e;t=mC(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=hC(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=mS(u)?u:Vve(t[i+1])?[]:{})}H(s,c,l),s=s[c]}return e}var CC=SC;function Vbe(e,t,n){return e==null?e:CC(e,t,n)}var wC=Vbe;function Hbe(e){return e}var Ube=Hbe;function Wbe(e){return typeof e==`function`?e:Ube}var Gbe=Wbe,Kbe=/\s/;function qbe(e){for(var t=e.length;t--&&Kbe.test(e.charAt(t)););return t}var Jbe=qbe,Ybe=/^\s+/;function TC(e){return e&&e.slice(0,Jbe(e)+1).replace(Ybe,``)}var Xbe=TC,Zbe=NaN,EC=/^[-+]0x[0-9a-f]+$/i,Qbe=/^0b[01]+$/i,DC=/^0o[0-7]+$/i,$be=parseInt;function exe(e){if(typeof e==`number`)return e;if(sC(e))return Zbe;if(mS(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=mS(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Xbe(e);var n=Qbe.test(e);return n||DC.test(e)?$be(e.slice(2),n?2:8):EC.test(e)?Zbe:+e}var OC=exe,txe=1/0,nxe=17976931348623157e292;function rxe(e){return e?(e=OC(e),e===txe||e===-txe?(e<0?-1:1)*nxe:e===e?e:0):e===0?e:0}var ixe=rxe;function axe(e){var t=ixe(e),n=t%1;return t===t?n?t-n:t:0}var oxe=axe,sxe=9007199254740991,kC=4294967295,cxe=Math.min;function lxe(e,t){if(e=oxe(e),e<1||e>sxe)return[];var n=kC,r=cxe(e,kC);t=Gbe(t),e-=kC;for(var i=Eve(r,t);++n<e;)t(n);return i}var uxe=lxe;function AC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var jC=AC,MC=Object.create,NC=function(){function e(){}return function(t){if(!mS(t))return{};if(MC)return MC(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function PC(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var dxe=PC();function fxe(e,t){return e&&dxe(e,t,nC)}var pxe=fxe,mxe=1,FC=2;function hxe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new NS;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?abe(u,l,mxe|FC,r,d):f))return!1}}return!0}var gxe=hxe;function IC(e){return e===e&&!mS(e)}var _xe=IC;function vxe(e){for(var t=nC(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,_xe(i)]}return t}var yxe=vxe;function bxe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var LC=bxe;function xxe(e){var t=yxe(e);return t.length==1&&t[0][2]?LC(t[0][0],t[0][1]):function(n){return n===e||gxe(n,e,t)}}var Sxe=xxe;function Cxe(e,t){return e!=null&&t in Object(e)}var wxe=Cxe;function Txe(e,t){return e!=null&&Fbe(e,t,wxe)}var Exe=Txe,Dxe=1,Oxe=2;function kxe(e,t){return cC(e)&&_xe(t)?LC(hC(e),t):function(n){var r=_C(n,e);return r===void 0&&r===t?Exe(n,e):abe(t,r,Dxe|Oxe)}}var Axe=kxe;function jxe(e){return function(t){return t?.[e]}}var Mxe=jxe;function Nxe(e){return function(t){return kbe(t,e)}}var RC=Nxe;function Pxe(e){return cC(e)?Mxe(hC(e)):RC(e)}var Fxe=Pxe;function Ixe(e){return typeof e==`function`?e:e==null?Ube:typeof e==`object`?HS(e)?Axe(e[0],e[1]):Sxe(e):Fxe(e)}var Lxe=Ixe;function Rxe(e,t,n){var r=HS(e),i=r||qS(e)||QS(e);if(t=Lxe(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:mS(e)&&_S(a)?NC(tS(e)):{}}return(i?jC:pxe)(e,function(e,r,i){return t(n,e,r,i)}),n}var zC=Rxe;function zxe(e,t,n){(n!==void 0&&!oS(e[t],n)||n===void 0&&!(t in e))&&bC(e,t,n)}var BC=zxe,VC=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Bxe=VC&&typeof module==`object`&&module&&!module.nodeType&&module,HC=Bxe&&Bxe.exports===VC?qx.Buffer:void 0,Vxe=HC?HC.allocUnsafe:void 0;function Hxe(e,t){if(t)return e.slice();var n=e.length,r=Vxe?Vxe(n):new e.constructor(n);return e.copy(r),r}var UC=Hxe;function Uxe(e){var t=new e.constructor(e.byteLength);return new IS(t).set(new IS(e)),t}var WC=Uxe;function Wxe(e,t){var n=t?WC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Gxe=Wxe;function Kxe(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var qxe=Kxe;function Jxe(e){return typeof e.constructor==`function`&&!Eye(e)?NC(tS(e)):{}}var Yxe=Jxe;function Xxe(e){return nS(e)&&eC(e)}var GC=Xxe;function Zxe(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var KC=Zxe;function qC(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?bC(n,s,c):H(n,s,c)}return n}var JC=qC;function Qxe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var $xe=Qxe,eSe=Object.prototype.hasOwnProperty;function tSe(e){if(!mS(e))return $xe(e);var t=Eye(e),n=[];for(var r in e)r==`constructor`&&(t||!eSe.call(e,r))||n.push(r);return n}var nSe=tSe;function rSe(e){return eC(e)?Cye(e,!0):nSe(e)}var YC=rSe;function iSe(e){return JC(e,YC(e))}var aSe=iSe;function oSe(e,t,n,r,i,a,o){var s=KC(e,n),c=KC(t,n),l=o.get(c);if(l){BC(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=HS(c),p=!f&&qS(c),m=!f&&!p&&QS(c);u=c,f||p||m?HS(s)?u=s:GC(s)?u=qxe(s):p?(d=!1,u=UC(c,!0)):m?(d=!1,u=Gxe(c,!0)):u=[]:rS(c)||KS(c)?(u=s,KS(s)?u=aSe(s):(!mS(s)||_S(s))&&(u=Yxe(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),BC(e,n,u)}var sSe=oSe;function cSe(e,t,n,r,i){e!==t&&dxe(t,function(a,o){if(i||=new NS,mS(a))sSe(e,t,o,n,cSe,r,i);else{var s=r?r(KC(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),BC(e,o,s)}},YC)}var XC=cSe;function ZC(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var QC=ZC,lSe=Math.max;function uSe(e,t,n){return t=lSe(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=lSe(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),QC(e,this,s)}}var $C=uSe;function ew(e){return function(){return e}}var tw=ew,dSe=Rbe?function(e,t){return Rbe(e,`toString`,{configurable:!0,enumerable:!1,value:tw(t),writable:!0})}:Ube,fSe=800,pSe=16,mSe=Date.now;function nw(e){var t=0,n=0;return function(){var r=mSe(),i=pSe-(r-n);if(n=r,i>0){if(++t>=fSe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var rw=nw(dSe);function iw(e,t){return rw($C(e,t,Ube),e+``)}var aw=iw;function hSe(e,t,n){if(!mS(n))return!1;var r=typeof t;return(r==`number`?eC(n)&&Vve(t,n.length):r==`string`&&t in n)?oS(n[t],e):!1}var gSe=hSe;function _Se(e){return aw(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&gSe(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var ow=_Se(function(e,t,n){XC(e,t,n)}),sw=Jx?Jx.isConcatSpreadable:void 0;function vSe(e){return HS(e)||KS(e)||!!(sw&&e&&e[sw])}var cw=vSe;function ySe(e,t,n,r,i){var a=-1,o=e.length;for(n||=cw,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?ySe(s,t-1,n,r,i):vve(i,s):r||(i[i.length]=s)}return i}var lw=ySe,bSe=1/0;function uw(e){return e!=null&&e.length?lw(e,bSe):[]}var dw=uw;function xSe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var SSe=xSe;function CSe(e){return e!==e}var wSe=CSe;function TSe(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var ESe=TSe;function DSe(e,t,n){return t===t?ESe(e,t,n):SSe(e,wSe,n)}var fw=DSe;function pw(e,t){return!!(e!=null&&e.length)&&fw(e,t,0)>-1}var mw=pw;function OSe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var kSe=OSe;function ASe(){}var hw=ASe,gw=rC&&1/RS(new rC([,-0]))[1]==1/0?function(e){return new rC(e)}:hw,_w=200;function jSe(e,t,n){var r=-1,i=mw,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=kSe;else if(a>=_w){var l=t?null:gw(e);if(l)return RS(l);o=!1,i=FS,c=new q_e}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var MSe=jSe;function NSe(e){return e&&e.length?MSe(e):[]}var PSe=NSe,FSe=`[object Map]`,ISe=`[object Set]`,LSe=Object.prototype.hasOwnProperty;function RSe(e){if(e==null)return!0;if(eC(e)&&(HS(e)||typeof e==`string`||typeof e.splice==`function`||qS(e)||QS(e)||KS(e)))return!e.length;var t=aC(e);if(t==FSe||t==ISe)return!e.size;if(Eye(e))return!Aye(e).length;for(var n in e)if(LSe.call(e,n))return!1;return!0}var vw=RSe,zSe=Object.prototype;function yw(e){for(let t in e)if(zSe.hasOwnProperty.call(e,t))return!1;return!0}const BSe=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`],VSe=[`items`,`allOf`,`oneOf`,`anyOf`],bw=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];[...BSe,...VSe,...bw];function xw(e){return typeof e==`object`}function Sw(e){return xw(e)?yw(e):e===!0}function Cw(e,t){return e<t?-1:e>t?1:0}function HSe(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){let i=e;e=t,t=i,r=n}let i=new Set(e);for(let e=0;e<r;e++)i.add(t[e]);return Array.from(i)}function USe(e,t){let n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){let n=e;e=t,t=n}let r=new Set(t);for(let t=0;t<e.length&&r.size>0;t++){let i=e[t];r.delete(i)&&n.push(i)}return n}function ww(e){return e.length===0}function WSe(e){return(t,n)=>{let r=t.length-n.length;if(r!==0)return r;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){let i=e(t[r],n[r]);if(i!==0)return i}return 0}}function GSe(e,{threshold:t=12}={}){return n=>{let r=n.length;if(r===0)return n;if(r<=t){let t=[],i=0;outer:for(let a=0;a<r;a++){let r=n[a];for(let n=0;n<i;n++)if(e(r,t[n])===0)continue outer;i=t.push(r)}return t}let i=n.slice().sort(e),a=0;for(let t=1;t<r;t++)e(i[a],i[t])!==0&&++a!==t&&(i[a]=i[t]);return i.length=a+1,i}}function KSe(e){return(t,n)=>{let r=[],i=t.length,a=n.length;if(i===0||a===0)return r;if(i>a){let e=t;t=n,n=e;let r=i;i=a,a=r}let o=[...t].sort(e),s=[...n].sort(e),c=0,l=0;for(;c<i&&l<a;){let t=e(o[c],s[l]);t===0?((r.length===0||e(r[r.length-1],o[c])!==0)&&r.push(o[c]),c++,l++):t<0?c++:l++}return r}}function Tw(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}const Ew=Tw;var Dw=()=>0,Ow=e=>e===void 0,kw=e=>typeof e!=`object`,Aw={boolean:0,number:1,string:2};function qSe(e,t){let n=typeof e,r=typeof t;return n===r?Cw(e,t):Aw[n]-Aw[r]}function JSe(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(r>n){let n=e;e=t,t=n}let i=new Set(e),a=t.length;for(let n=0;n<a;n++){let r=t[n];i.has(r)||e.push(r)}return e}function jw(e,t,n=Dw){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function Mw(e){return jw(Ow,e)}function Nw(e,t){return jw(t=>t===void 0||e(t),t)}function YSe(e,t){return jw(Array.isArray,e,t)}var Pw=Mw(Cw),Fw=Nw(e=>e===0,(e,t)=>e-t);function XSe({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=Ew(t,e=>Object.keys(e).sort());function r(e){return(t,r)=>{let i=n(t),a=n(r),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=Cw(i[e],a[e]);if(t!==0)return t}if(i.length!==a.length)return i.length-a.length;for(let n=0;n<o;n++){let a=i[n],o=e(t[a],r[a]);if(o!==0)return o}return 0}}function i(t){let n=WSe(t),r=Ew(e,GSe(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(Cw);function o(e,t){if(xw(e)){if(xw(t)){let n=JSe(Object.keys(e),Object.keys(t)),r=n.length;for(let i=0;i<r;i++){let r=n[i];if(e[r]===t[r])continue;let a=(m[r]??s)(e[r],t[r]);if(a!==0)return a}return 0}return t===!0&&yw(e)?0:1}return xw(t)?e===!0&&yw(t)?0:-1:Cw(e,t)}let s=Mw(l),c=jw(kw,YSe(r(s),WSe(l)),qSe);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=Mw(o),d=Nw(yw,r(u)),f=Mw(i(o)),p=Nw(Sw,o),m={$id:Pw,$comment:Pw,$defs:d,$ref:Pw,$schema:Pw,const:s,contains:u,contentEncoding:Pw,contentMediaType:Pw,default:s,definitions:d,description:Pw,else:u,examples:s,exclusiveMaximum:Pw,exclusiveMinimum:Pw,format:Pw,if:u,maximum:Pw,maxItems:Pw,maxLength:Pw,maxProperties:Pw,minimum:Pw,multipleOf:Pw,not:u,pattern:Pw,propertyNames:u,readOnly:Pw,then:u,title:Pw,writeOnly:Pw,uniqueItems:Nw(e=>e===!1,Dw),minLength:Fw,minItems:Fw,minProperties:Fw,required:Nw(ww,a),enum:Nw(ww,i(l)),type:Mw((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?Cw(e,t):a(n?e:[e],r?t:[t])}),items:Nw(e=>!Array.isArray(e)&&Sw(e),YSe(o,WSe(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:Nw(yw,r(Mw(YSe(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function ZSe(e){return e}const Iw=(e,t)=>e?Iw(t%e,e):t,Lw=(e,t)=>Math.abs(e*t)/Iw(e,t);function Rw(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*zw(e,t,n){let r=e.length,i=t.length;if(r>0&&i>0)for(let a=0;a<r;a++){let r=e[a];for(let e=0;e<i;e++)yield n(r,t[e])}}function Bw(e,t){return e||t}function QSe(e){return(t,n)=>{let r={...t},i=Object.keys(n),a=i.length;for(let o=0;o<a;o++){let a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function $Se(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function Vw(e,t,n){n===void 0||Sw(n)?delete e[t]:e[t]=n}var eCe=[`properties`,`patternProperties`,`additionalProperties`];function tCe(e){let t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){let n=t[i];r.push({regExp:new RegExp(n),schema:e[n]})}return[r,t]}var nCe=[[],[]];function rCe(e,t,n){let r=n.length;for(let i=0;i<r;i++){let r=n[i];if(!r.regExp.test(t))continue;let a=r.schema;if(a===!1)return!0;e.push(a)}return!1}var Hw=[`items`,`additionalItems`],iCe=[`if`,`then`,`else`];function aCe(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function oCe(e,t){if(e===t)return e;switch(e){case`number`:if(t===`integer`)return`integer`;case`integer`:if(t===`number`)return`integer`;default:return}}function Uw(e,t,n){return[e,t,n]}function sCe(e){let t=new Map;for(let[n,r,i]of e){let e=e=>{if(!i(e))throw Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(e[n])}, ${r}: ${JSON.stringify(e[r])})`)};for(let i of[[n,r],[r,n]]){let n=t.get(i[0]);n===void 0&&(n=[],t.set(i[0],n)),n.push({oppositeKey:i[1],check:e})}}return t}const cCe=[Uw(`minimum`,`maximum`,e=>e.maximum>=e.minimum),Uw(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),Uw(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),Uw(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),Uw(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),Uw(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),Uw(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function lCe({mergePatterns:e=Rw,isSubRegExp:t=Object.is,intersectJson:n=USe,deduplicateJsonSchemaDef:r=ZSe,defaultMerger:i=ZSe,assigners:a=[],checks:o=cCe,mergers:s}={}){function c(e){let t=e.length,n=e[0];for(let r=1;r<t;r++){let t=_(n,e[r]);if(t===!1)return!1;Sw(t)||(n=t)}return n}function l(e,t,n,r,i,a,o){if(e.length=0,n===!1)return!1;if(e.push(n),i!==void 0){if(i===!1)return!1;e.push(i)}if(rCe(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(rCe(e,t,r))return!1}else s&&o!==void 0&&e.push(o);return e.length===1?e[0]:c(e)}function u(e,t,n,r,i,a){let o=n.length;if(o>0&&i!==!1)if(a)Object.assign(e,t);else for(let a=0;a<o;a++){let o=n[a];r.has(o)||(e[o]=_(t[o],i))}return e}let d=(n,{properties:r={},patternProperties:i,additionalProperties:a=!0},{properties:o={},patternProperties:s,additionalProperties:c=!0})=>{let d=Sw(a),f=Sw(c);if(d&&f)return Vw(n,`properties`,v(r,o)),Vw(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;Vw(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?tCe(i):nCe,[b,x]=s?tCe(s):nCe,S=[],C=new Set,w=f?void 0:c;for(let e=0;e<h;e++){let t=m[e];C.add(t);let n=l(S,t,r[t],g,o[t],b,w);n!==void 0&&(p[t]=n)}let T=Object.keys(o),E=T.length,D=d?void 0:a;for(let e=0;e<E;e++){let t=T[e];if(C.has(t))continue;let n=l(S,t,o[t],b,void 0,g,D);n!==void 0&&(p[t]=n)}Vw(n,`properties`,p);let O={},k=new Set;if(y.length>0&&x.length>0){let n=zw(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])});for(;!n.next().done;);}return O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),Vw(n,`patternProperties`,O),n},f=(e,{items:t=[],additionalItems:n},{items:r=[],additionalItems:i})=>{let a=Array.isArray(t),o=Array.isArray(r),s=[];if(e.items=s,a&&o){let[a,o,c]=t.length<r.length?[t.length,n,r]:[r.length,i,t],l=0;for(;l<a;l++)s.push(_(t[l],r[l]));if(o===!1)e.additionalItems=!1;else{let t=o===void 0||Sw(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));Vw(e,`additionalItems`,n!==void 0&&i!==void 0?_(n,i):n??i)}}else if(a||o){let[o,c,l]=a?[t,r,n]:[r,t,i];Vw(e,`additionalItems`,l&&_(l,c));for(let e=0;e<o.length;e++)s.push(_(o[e],c))}else delete e.additionalItems,e.items=_(t,r);return e},p=(e,t,n)=>{aCe(e,t);let r=aCe({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){return r(Array.from(zw(e,t,_)))}let h=$Se([[eCe,d],[Hw,f],[iCe,p],...a]),g=sCe(o);function _(e,t){if(e===!1||t===!1)return!1;if(Sw(e))return Sw(t)?!0:t;if(Sw(t))return e;let n={...e},r=new Set,a=new Set,o=Object.keys(t),s=o.length;for(let c=0;c<s;c++){let s=o[c],l=t[s];if(l===void 0)continue;let u=g.get(s);if(u!==void 0){let t=u.length;for(let n=0;n<t;n++){let t=u[n];e[t.oppositeKey]!==void 0&&a.add(t.check)}}let d=e[s];if(d===void 0){n[s]=l;continue}let f=h.get(s);if(f){r.add(f);continue}let p=y[s]??i;n[s]=p(d,l)}for(let i of r)n=i(n,e,t);for(let e of a)e(n);return n}let v=QSe(_),y={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(e,t)=>{if(e===t)return e;let n=Array.isArray(e),r=Array.isArray(t);if(!n&&!r){let n=oCe(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)for(let n of zw(e,t,oCe))n!==void 0&&i.add(n);else{let r=n?e:t,a=n?t:e,o=r.length;for(let e=0;e<o;e++){let t=oCe(a,r[e]);t!==void 0&&i.add(t)}}let a=i.size;if(a===1)return i.values().next().value;if(a>1)return Array.from(i)}throw Error(`It is not possible to create an intersection of the following incompatible types: ${e.toString()}, ${t.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(e,t)=>{let n=r([e,t]);return n.length===1?n[0]:{anyOf:n}},pattern:e,readOnly:Bw,writeOnly:Bw,enum:(e,t)=>{let r=n(e,t);if(r.length===0)throw Error(`Intersection of the following enums is empty: "${JSON.stringify(e)}", "${JSON.stringify(t)}"`);return r},anyOf:m,oneOf:m,allOf:(e,t)=>r(e.concat(t)),propertyNames:_,contains:_,dependencies:QSe((e,t)=>Array.isArray(e)?Array.isArray(t)?HSe(e,t):_(t,{required:e}):Array.isArray(t)?_(e,{required:t}):_(e,t)),examples:(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))throw Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return HSe(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return Lw(e,t)/n},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:Bw,required:HSe,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function Ww(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(typeof e==`boolean`||e.allOf===void 0){t.push(e);continue}let{allOf:r,...i}=e;t.push(i);for(let e=r.length-1;e>=0;e--)n.push(r[e])}return t}function Gw(e){return t=>e(Ww(t))}var Kw=d(s((e=>{var t=/~/,n=/~[01]/g;function r(e){switch(e){case`~1`:return`/`;case`~0`:return`~`}throw Error(`Invalid tilde escape: `+e)}function i(e){return t.test(e)?e.replace(n,r):e}function a(e){if(typeof e==`string`){if(e=e.split(`/`),e[0]===``)return e;throw Error(`Invalid JSON pointer.`)}else if(Array.isArray(e)){for(let t of e)if(typeof t!=`string`&&typeof t!=`number`)throw Error(`Invalid JSON pointer. Must be of type string or number.`);return e}throw Error(`Invalid JSON pointer.`)}function o(e,t){if(typeof e!=`object`)throw Error(`Invalid input object.`);t=a(t);var n=t.length;if(n===1)return e;for(var r=1;r<n;){if(e=e[i(t[r++])],n===r)return e;if(typeof e!=`object`||!e)return}}e.get=o}))(),1);function qw(e,t){return e&&JC(t,nC(t),e)}var uCe=qw;function dCe(e,t){return e&&JC(t,YC(t),e)}var fCe=dCe;function pCe(e,t){return JC(e,GS(e),t)}var mCe=pCe,hCe=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)vve(t,GS(e)),e=tS(e);return t}:WS;function gCe(e,t){return JC(e,hCe(e),t)}var Jw=gCe;function _Ce(e){return bve(e,YC,hCe)}var Yw=_Ce,Xw=Object.prototype.hasOwnProperty;function Zw(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Xw.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var vCe=Zw;function yCe(e,t){var n=t?WC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Qw=yCe,bCe=/\w*$/;function xCe(e){var t=new e.constructor(e.source,bCe.exec(e));return t.lastIndex=e.lastIndex,t}var $w=xCe,eT=Jx?Jx.prototype:void 0,SCe=eT?eT.valueOf:void 0;function tT(e){return SCe?Object(SCe.call(e)):{}}var CCe=tT,nT=`[object Boolean]`,rT=`[object Date]`,iT=`[object Map]`,wCe=`[object Number]`,TCe=`[object RegExp]`,aT=`[object Set]`,ECe=`[object String]`,U=`[object Symbol]`,DCe=`[object ArrayBuffer]`,OCe=`[object DataView]`,kCe=`[object Float32Array]`,oT=`[object Float64Array]`,ACe=`[object Int8Array]`,sT=`[object Int16Array]`,jCe=`[object Int32Array]`,MCe=`[object Uint8Array]`,NCe=`[object Uint8ClampedArray]`,PCe=`[object Uint16Array]`,FCe=`[object Uint32Array]`;function ICe(e,t,n){var r=e.constructor;switch(t){case DCe:return WC(e);case nT:case rT:return new r(+e);case OCe:return Qw(e,n);case kCe:case oT:case ACe:case sT:case jCe:case MCe:case NCe:case PCe:case FCe:return Gxe(e,n);case iT:return new r;case wCe:case ECe:return new r(e);case TCe:return $w(e);case aT:return new r;case U:return CCe(e)}}var cT=ICe,LCe=`[object Map]`;function lT(e){return nS(e)&&aC(e)==LCe}var RCe=lT,zCe=ZS&&ZS.isMap,BCe=zCe?YS(zCe):RCe,uT=`[object Set]`;function VCe(e){return nS(e)&&aC(e)==uT}var dT=VCe,fT=ZS&&ZS.isSet,HCe=fT?YS(fT):dT,UCe=1,pT=2,WCe=4,GCe=`[object Arguments]`,KCe=`[object Array]`,qCe=`[object Boolean]`,mT=`[object Date]`,JCe=`[object Error]`,YCe=`[object Function]`,XCe=`[object GeneratorFunction]`,ZCe=`[object Map]`,hT=`[object Number]`,gT=`[object Object]`,QCe=`[object RegExp]`,$Ce=`[object Set]`,ewe=`[object String]`,twe=`[object Symbol]`,nwe=`[object WeakMap]`,_T=`[object ArrayBuffer]`,vT=`[object DataView]`,rwe=`[object Float32Array]`,yT=`[object Float64Array]`,bT=`[object Int8Array]`,iwe=`[object Int16Array]`,awe=`[object Int32Array]`,owe=`[object Uint8Array]`,swe=`[object Uint8ClampedArray]`,cwe=`[object Uint16Array]`,lwe=`[object Uint32Array]`,xT={};xT[GCe]=xT[KCe]=xT[_T]=xT[vT]=xT[qCe]=xT[mT]=xT[rwe]=xT[yT]=xT[bT]=xT[iwe]=xT[awe]=xT[ZCe]=xT[hT]=xT[gT]=xT[QCe]=xT[$Ce]=xT[ewe]=xT[twe]=xT[owe]=xT[swe]=xT[cwe]=xT[lwe]=!0,xT[JCe]=xT[YCe]=xT[nwe]=!1;function ST(e,t,n,r,i,a){var o,s=t&UCe,c=t&pT,l=t&WCe;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!mS(e))return e;var u=HS(e);if(u){if(o=vCe(e),!s)return qxe(e,o)}else{var d=aC(e),f=d==YCe||d==XCe;if(qS(e))return UC(e,s);if(d==gT||d==GCe||f&&!i){if(o=c||f?{}:Yxe(e),!s)return c?Jw(e,fCe(o,e)):mCe(e,uCe(o,e))}else{if(!xT[d])return i?e:{};o=cT(e,d,s)}}a||=new NS;var p=a.get(e);if(p)return p;a.set(e,o),HCe(e)?e.forEach(function(r){o.add(ST(r,t,n,r,e,a))}):BCe(e)&&e.forEach(function(r,i){o.set(i,ST(r,t,n,i,e,a))});var m=u?void 0:(l?c?Yw:Mye:c?YC:nC)(e);return jC(m||e,function(r,i){m&&(i=r,r=e[i]),H(o,i,ST(r,t,n,i,e,a))}),o}var W=ST;function uwe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var CT=uwe;function wT(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var TT=wT;function ET(e,t){return t.length<2?e:kbe(e,TT(t,0,-1))}var dwe=ET,fwe=Object.prototype.hasOwnProperty;function pwe(e,t){t=mC(t,e);var n=-1,r=t.length;if(!r)return!0;for(var i=e==null||typeof e!=`object`&&typeof e!=`function`;++n<r;){var a=t[n];if(typeof a==`string`){if(a===`__proto__`&&!fwe.call(e,`__proto__`))return!1;if(a===`constructor`&&n+1<r&&typeof t[n+1]==`string`&&t[n+1]===`prototype`){if(i&&n===0)continue;return!1}}}var o=dwe(e,t);return o==null||delete o[hC(CT(t))]}var mwe=pwe;function DT(e){return rS(e)?void 0:e}var hwe=DT;function gwe(e){return e!=null&&e.length?lw(e,1):[]}var OT=gwe;function _we(e){return rw($C(e,void 0,OT),e+``)}var vwe=_we,kT=1,ywe=2,bwe=4,AT=vwe(function(e,t){var n={};if(e==null)return n;var r=!1;t=uC(t,function(t){return t=mC(t,e),r||=t.length>1,t}),JC(e,Yw(e),n),r&&(n=W(n,kT|ywe|bwe,hwe));for(var i=t.length;i--;)mwe(n,t[i]);return n}),xwe=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function i(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){let r=i(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function c(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],c=!1,l=!1,u=s;for(let i=0;i<e.length;i++){let s=e[i];if(!(s===`[`||s===`]`))if(s===`:`){if(c===!0&&(l=!0),!u(a,r,n))break;if(++t>7){n.error=!0;break}i>0&&e[i-1]===`:`&&(c=!0),r.push(`:`);continue}else if(s===`%`){if(!u(a,r,n))break;u=o}else{a.push(s);continue}}return a.length&&(u===o?n.zone=a.join(``):l?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function l(e){if(u(e,`:`)<2)return{host:e,isIPV6:!1};let t=c(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function u(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function d(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}function f(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function p(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let t=l(n);n=t.isIPV6===!0?`[${t.escapedHost}]`:e.host}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:a,recomposeAuthority:p,normalizeComponentEncoding:f,removeDotSegments:d,isIPv4:r,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:i}})),jT=s(((e,t)=>{var{isUUID:n}=xwe(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=S(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=S(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},y={scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},b={scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0},x={http:h,https:g,ws:_,wss:v,urn:y,"urn:uuid":b};Object.setPrototypeOf(x,null);function S(e){return e&&(x[e]||x[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:x,isValidSchemeName:a,getSchemeHandler:S}})),Swe=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:s}=xwe(),{SCHEMES:c,getSchemeHandler:l}=jT();function u(e,t){return typeof e==`string`?e=m(g(e,t),t):typeof e==`object`&&(e=g(m(e,t),t)),e}function d(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=f(g(e,r),g(t,r),r,!0);return r.skipEscape=!0,m(i,r)}function f(e,t,n,i){let a={};return i||(e=g(m(e,n),n),t=g(m(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function p(e,t,n){return typeof e==`string`?(e=unescape(e),e=m(a(g(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=m(a(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=m(a(g(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=m(a(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function m(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},a=Object.assign({},t),o=[],s=l(a.scheme||n.scheme);s&&s.serialize&&s.serialize(n,a),n.path!==void 0&&(a.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),a.reference!==`suffix`&&n.scheme&&o.push(n.scheme,`:`);let c=i(n);if(c!==void 0&&(a.reference!==`suffix`&&o.push(`//`),o.push(c),n.path&&n.path[0]!==`/`&&o.push(`/`)),n.path!==void 0){let e=n.path;!a.absolutePath&&(!s||!s.absolutePath)&&(e=r(e)),c===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),o.push(e)}return n.query!==void 0&&o.push(`?`,n.query),n.fragment!==void 0&&o.push(`#`,n.fragment),o.join(``)}var h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||``,i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host)if(o(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let t=l(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&a===!1&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!t||t&&!t.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&=escape(unescape(i.path)),i.fragment&&=encodeURI(decodeURIComponent(i.fragment))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return i}var _={SCHEMES:c,normalize:u,resolve:d,resolveComponent:f,equal:p,serialize:m,parse:g};t.exports=_,t.exports.default=_,t.exports.fastUri=_})),MT=d(Swe(),1);function Cwe(e,t){if(`$id`in e&&MT.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(mS(e)){let n=Cwe(e,t);if(n!==void 0)return n}}else if(mS(n)){let e=Cwe(n,t);if(e!==void 0)return e}}function wwe(e,t){let n=_C(e,`$id`,t);`$ref`in e&&(e={...e,[Vx]:MT.default.resolve(n,e[Vx])});for(let[t,r]of Object.entries(e))Array.isArray(r)?e={...e,[t]:r.map(e=>mS(e)?wwe(e,n):e)}:mS(r)&&(e={...e,[t]:wwe(r,n)});return e}function Twe(e,t){let n=t[e];return[AT(t,[e]),n]}function Ewe(e,t={},n=[],r=_C(t,[`$id`])){let i=e||``,a;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));r===void 0||`$id`in t&&t.$id===r?a=Kw.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=Cwe(t,r.replace(/\/$/,``)),a!==void 0&&(a=Kw.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(r?MT.default.resolve(r,i):i).replace(/#\/?$/,``).split(`#`);a=Cwe(t,e.replace(/\/$/,``)),a!==void 0&&(r=a.$id,vw(n)||(a=Kw.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let o=a[Vx];if(o){if(n.includes(o)){if(n.length===1)throw Error(`Definition for ${e} is a circular reference`);let[t,...r]=n,a=[...r,i,t].join(` -> `);throw Error(`Definition for ${t} contains a circular reference through ${a}`)}let[s,c]=Twe(Vx,a),l=Ewe(c,t,[...n,i],r);return Object.keys(s).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[oge]:[s,l]}:{...s,...l}:l}return a}function NT(e,t={},n=_C(t,[`$id`])){return Ewe(e,t,[],n)}var Dwe=`[object String]`;function Owe(e){return typeof e==`string`||!HS(e)&&nS(e)&&eS(e)==Dwe}var PT=Owe;function FT(e){let t,n=_C(e,dge);return PT(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function IT(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:e==null?`null`:typeof e==`boolean`?`boolean`:isNaN(e)?typeof e==`object`?`object`:`string`:`number`}var kwe=aw(function(e){return MSe(lw(e,1,GC,!0))});function LT(e){let{type:t}=e;return!t&&e.const?IT(e.const):!t&&e.enum?`string`:!t&&(e.properties||e.additionalProperties||e.patternProperties)?`object`:(Array.isArray(t)&&(t=t.length===2&&t.includes(`null`)?t.find(e=>e!==`null`):t[0]),t)}function RT(e,t){let n=Object.assign({},e);return Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&Nx(a)?n[r]=RT(i,a):e&&t&&(LT(e)===`object`||LT(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=kwe(i,a):n[r]=a,n},n)}var zT=`[object Number]`;function BT(e){return typeof e==`number`||nS(e)&&eS(e)==zT}var Awe=BT;function jwe(e,t,n){if(e&&n){let r=_C(e,n);if(r===void 0)return;for(let e=0;e<t.length;e++){let i=t[e],a=_C(i,[Bx,n],{});if(!(a.type===`object`||a.type===`array`)&&(a.const===r||a.enum?.includes(r)))return e}}}function Mwe(e,t,n,r,i){if(t===void 0)return 0;let a=jwe(t,n,i);if(Awe(a))return a;for(let a=0;a<n.length;a++){let o=n[a];if(i&&vC(o,[`properties`,i])){let n=_C(t,i),s=_C(o,[Bx,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[Bx]).map(e=>({required:[e]}))},i;if(o.anyOf){let{...e}=o;e.allOf?e.allOf=e.allOf.slice():e.allOf=[],e.allOf.push(n),i=e}else i=Object.assign({},o,n);if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}function VT(e,t,n={},r,i,a=!1){return XT(e,t,n,r,void 0,void 0,i,a)[0]}function HT(e,t,n,r,i,a,o){let{if:s,then:c,else:l,...u}=t,d=e.isValid(s,a||{},n),f=[u],p=[];if(r)c&&typeof c!=`boolean`&&(p=p.concat(XT(e,c,n,a,r,i,o))),l&&typeof l!=`boolean`&&(p=p.concat(XT(e,l,n,a,r,i,o)));else{let t=d?c:l;t&&typeof t!=`boolean`&&(p=p.concat(XT(e,t,n,a,r,i,o)))}return p.length&&(f=p.map(e=>RT(u,e))),f.flatMap(t=>XT(e,t,n,a,r,i,o))}function UT(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>uxe(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function WT(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(wC(t,[n],e.patternProperties[n]),t),{})}function Nwe(e,t,n,r,i,a,o,s){let c=Pwe(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?Rwe(e,t,n,r,i,a,o).flatMap(t=>XT(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?UT(t.allOf.map(t=>XT(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function Pwe(e,t,n,r,i,a,o,s){let c=GT(t,n,i,void 0,s);return c===t?[t]:XT(e,c,n,a,r,i,o,s)}function GT(e,t,n,r,i){if(!Nx(e))return e;let a=e;if(`$ref`in a){let{$ref:e,...i}=a;if(n.includes(e))return a;n.push(e),a={...NT(e,t,r),...i},`$id`in a&&(r=a.$id)}if(`properties`in a){let e=[],o=zC(a[Bx],(a,o,s)=>{let c=[...n];a[s]=GT(o,t,c,r,i),e.push(c)},{});ow(n,PSe(dw(e))),a={...a,[Bx]:o}}if(`items`in a&&!Array.isArray(a.items)&&typeof a.items!=`boolean`&&(a={...a,items:GT(a.items,t,n,r,i)}),i){let o,s;`anyOf`in e&&Array.isArray(e.anyOf)?(o=Fx,s=a[Fx]):`oneOf`in e&&Array.isArray(e.oneOf)&&(o=zx,s=a[zx]),o&&s&&(a={...a,[o]:s.map(e=>GT(e,t,n,r,i))})}return oC(e,a)?e:a}function KT(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&Nx(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=WT(a,t);if(!vw(r)){a.properties[t]=VT(e,{[oge]:Object.values(r)},n,_C(o,[t]),i),wC(a.properties,[t,Px],!0);return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:IT(_C(o,[t]))}:`$ref`in a.additionalProperties?VT(e,{[Vx]:_C(a.additionalProperties,[Vx])},n,o,i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:IT(_C(o,[t]))},a.properties[t]=r,wC(a.properties,[t,Px],!0)}else a.properties[t]={type:`null`},wC(a.properties,[t,Px],!0)}}),a}var{compareSchemaDefinitions:qT,compareSchemaValues:JT}=XSe(),{mergeArrayOfSchemaDefinitions:Fwe}=lCe({intersectJson:KSe(JT),deduplicateJsonSchemaDef:GSe(qT)}),Iwe=Gw(Fwe);function YT(e){return Iwe(e)}function XT(e,t,n,r,i=!1,a=[],o,s){return Nx(t)?Nwe(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return HT(e,c,n,i,a,r,o);if(`allOf`in c){if(i){let{allOf:e,...t}=c;return[...e,t]}try{let e=[],t=[];(s=c.allOf)==null||s.forEach(n=>{typeof n==`object`&&n.contains?e.push(n):t.push(n)}),e.length&&(c={...c,allOf:t}),c=o?o(c):YT(c),e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
|
|
68
68
|
`,e);let{allOf:t,...n}=c;return n}}return`properties`in c&&`patternProperties`in c&&(c=Object.keys(c.properties).reduce((t,i)=>{let a=WT(t,i);return vw(a)||(t.properties[i]=VT(e,{allOf:[t.properties[i],...Object.values(a)]},n,_C(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?KT(e,c,n,r,o):c}):[{}]}function Lwe(e,t,n,r,i){let a,{oneOf:o,anyOf:s,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(s)&&(a=s),a){let o=i===void 0&&r?{}:i,s=FT(t);a=a.map(e=>GT(e,n,[]));let l=Mwe(e,o,a,n,s);if(r)return a.map(e=>RT(c,e));t=RT(c,a[l])}return[t]}function Rwe(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return Lwe(e,c,n,r,a).flatMap(t=>zwe(e,s,t,n,r,i,a,o))}function zwe(e,t,n,r,i,a,o,s){let c=[n];for(let l in t){if(!i&&_C(o,[l])===void 0||n.properties&&!(l in n.properties))continue;let[u,d]=Twe(l,t);return Array.isArray(d)?c[0]=Bwe(n,d):Nx(d)&&(c=Vwe(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>zwe(e,u,t,r,i,a,o,s))}return c}function Bwe(e,t){if(!t)return e;let n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Vwe(e,t,n,r,i,a,o,s,c){return XT(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i;return t=RT(t,u),l===void 0?t:UT(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:Pwe(e,t,n,a,o,s))).flatMap(i=>Hwe(e,t,n,r,i,a,o,s,c))})}function Hwe(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!t||!t.properties)return!1;let{[r]:i}=t.properties;if(i){let t={type:`object`,properties:{[r]:i}};return e.isValid(t,s,n)||a}return!1});return!a&&l.length!==1?(console.warn(`ignoring oneOf in dependencies because there isn't exactly one subschema that is valid`),[t]):l.flatMap(i=>{let l=i,[u]=Twe(r,l.properties);return XT(e,{...l,properties:u},n,s,a,o,c).map(e=>RT(t,e))})}function ZT(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=FT(n)||r,c=n[i].map(n=>VT(e,n,t,a,o)),l=_C(a,s);if(l!==void 0)return c.find(e=>yC(_C(e,[Bx,s,sge],_C(e,[Bx,s,Ix])),l))}}function Uwe(e,t,n,r,i){let a=n;if(vC(n,`$ref`)&&(a=VT(e,n,t,void 0,i)),vw(r))return a;let[o,...s]=Array.isArray(r)?r:r.split(`.`);if(o&&vC(a,o))return a=_C(a,o),Uwe(e,t,a,s,i)}function Wwe(e,t,n,r,i,a){let o=Uwe(e,t,n,r,a);return o===void 0?i:o}const Gwe={title:`!@#$_UNKNOWN_$#@!`};function Kwe(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop();o.length&&o.forEach(n=>{s=Wwe(e,t,s,[Bx,n],{},a),vC(s,`oneOf`)?s=ZT(e,t,s,c,zx,_C(i,n),a):vC(s,`anyOf`)&&(s=ZT(e,t,s,c,Fx,_C(i,n),a))}),vC(s,`oneOf`)?s=ZT(e,t,s,c,zx,i,a):vC(s,`anyOf`)&&(s=ZT(e,t,s,c,Fx,i,a));let l=Wwe(e,t,s,[Bx,c],Gwe,a);l===Gwe&&(l=void 0);let u=Wwe(e,t,s,`required`,[],a),d;return l&&Array.isArray(u)&&(d=u.includes(c)),{field:l,isRequired:d}}function qwe(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}var Jwe=qwe;function Ywe(e,t){return function(n,r){if(n==null)return n;if(!eC(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var QT=Ywe(pxe);function $T(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}var eE=$T;function Xwe(e,t,n){var r=HS(e)?Jwe:eE,i=arguments.length<3;return r(e,Lxe(t,4),n,i,QT)}var Zwe=Xwe;const Qwe={type:`object`,$id:`_$junk_option_schema_id$_`,properties:{__not_really_there__:{type:`number`}}};function $we(e,t,n,r,i){let a=0;return n&&(mS(n.properties)?a+=Zwe(n.properties,(n,a,o)=>{let s=_C(r,o);if(typeof a==`boolean`)return n;if(vC(a,`$ref`)){let r=VT(e,a,t,s,i);return n+$we(e,t,r,s||{},i)}if((vC(a,`oneOf`)||vC(a,`anyOf`))&&s){let r=vC(a,`oneOf`)?zx:Fx,o=FT(a);return n+tE(e,t,s,_C(a,r),-1,o,i)}if(a.type===`object`)return mS(s)&&(n+=1),n+$we(e,t,a,s,i);if(a.type===IT(s)){let e=n+1;return a.default?e+=s===a.default?1:-1:a.const&&(e+=s===a.const?1:-1),e}return n},0):PT(n.type)&&n.type===IT(r)&&(a+=1)),a}function tE(e,t,n,r,i=-1,a,o){let s=r.map(e=>GT(e,t,[])),c=jwe(n,r,a);if(Awe(c))return c;let l=s.reduce((r,i,o)=>(Mwe(e,n,[Qwe,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||uxe(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=$we(e,t,c,n,o);return u.add(l),l>a?{bestIndex:i,bestScore:l}:r},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function nE(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(e=>Nx(e))}function eTe(e){return e==null}var rE=eTe;function iE(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){let a=Array.isArray(e)?e:[],o=i?a:t,s=i?t:a,c=o.map((e,o)=>s[o]===void 0?e:iE(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(Nx(t)){let a=Object.assign({},e);return Object.keys(t).reduce((a,o)=>{let s=_C(t,o),c=Nx(e)&&o in e,l=o in t,u=_C(e,o)??{},d=c&&Object.entries(u).some(([,e])=>Nx(e)),f=c&&Nx(_C(e,o)),p=l&&Nx(s);return f&&p&&!d?(a[o]={..._C(e,o),...s},a):(a[o]=iE(_C(e,o),s,n,r,i&&(c||!l)),a)},a)}return r&&(e!==void 0&&rE(t)||typeof t==`number`&&isNaN(t))||i&&!rE(t)?e:t}function aE(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&Nx(o))r[i]=aE(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let e=o;n===`preventDuplicates`&&(e=o.reduce((e,t)=>(a.includes(t)||e.push(t),e),[])),r[i]=a.concat(e)}else r[i]=o;return r},Object.assign({},e))}function tTe(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function oE(e,t,n={},r){let i=VT(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(e=>typeof e!=`boolean`&&tTe(e)):!1}function sE(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:oE(e,t.items,n,r)}function cE(e){let t=e[Ix],n=LT(e);return Nx(t)&&PT(t?.$data)&&n!==`object`&&n!==`array`}function nTe(e){if(`enum`in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(`const`in e)return e.const;throw Error(`schema cannot be inferred as a constant`)}function lE(e,t){if(e.enum){let n;if(t){let{enumNames:e}=Kx(t);n=e}return e.enum.map((e,t)=>({label:n?.[t]||String(e),value:e}))}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=FT(e);if(t){let{optionsSchemaSelector:e=i}=Kx(t);i=e}return n&&n.map((e,t)=>{let{title:n}=Kx(r?.[t]),a=e,o,s=n;if(i){let e=_C(a,[`properties`,i],{});o=_C(e,`default`,_C(e,`const`)),s=s||e?.title||a.title||String(o)}else o=nTe(a),s=s||a.title||String(o);return{schema:a,label:s,value:o}})}var uE=[`string`,`number`,`integer`,`boolean`,`null`],dE;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(dE||={});function fE(e,t=dE.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){let t=e.items[n];if(typeof t!=`boolean`)return t}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!=`boolean`)return e.items;return t!==dE.Ignore&&Nx(e.additionalItems)?e.additionalItems:{}}function pE(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&vw(t)&&n===null?null:t}function rTe(e,t,n,r,i,a=[],o={},s=!1,c=!1){let{emptyObjectFields:l=`populateAllDefaults`}=o;if(r===!0||s)e[t]=n;else if(r===`excludeObjectChildren`)(c&&n!==void 0||!Nx(n)||!vw(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;Nx(n)?l===`skipEmptyDefaults`?vw(n)||(e[t]=n):(!vw(n)||a.includes(t))&&(r||l!==`populateRequiredDefaults`)&&(e[t]=n):n!==void 0&&(l===`populateAllDefaults`||l===`skipEmptyDefaults`||r&&a.includes(t))&&(e[t]=n)}}function mE(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:l=void 0,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=Nx(i)?i:{},m=Nx(t)?t:{},h=r,g=null,_=c,v=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!cE(m))h=m[Ix];else if(Nx(h)&&Nx(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=aE(h,m.default);else if(`default`in m&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[Vx];s.includes(e)||(v=s.concat(e),g=NT(e,a));let t=i===void 0||Nx(i)&&vw(i);g&&!h&&t&&(h=m.default),d&&g&&!Nx(i)&&(p=i)}else if(`dependencies`in m)g=Rwe(e,m,a,!1,[],{...gE(e,m,n,h),...p},l)[0];else if(nE(m))h=m.items.map((t,n)=>mE(e,t,{rootSchema:a,includeUndefinedValues:o,_recurseList:s,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,parentDefaults:Array.isArray(r)?r[n]:void 0,rawFormData:p,required:u,shouldMergeDefaultsIntoFormData:d}));else if(`oneOf`in m){let{oneOf:t,...n}=m;if(t.length===0)return;let r=FT(m),{type:o=`null`}=n;!Array.isArray(o)&&uE.includes(o)&&_?.constAsDefaults===`skipOneOf`&&(_={..._,constAsDefaults:`never`}),g=t[tE(e,a,i??m.default,t,0,r,l)],g=RT(n,g)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=FT(m);g=t[tE(e,a,i??m.default,t,0,r,l)],g=RT(n,g)}if(g)return mE(e,g,{rootSchema:a,includeUndefinedValues:o,_recurseList:v,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let y=gE(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=iTe(e,m,a,i,c,l);(!Nx(i)||`allOf`in m)&&(y=iE(y,r,n,!0))}return y}function iTe(e,t,n,r,i,a){let o=!tTe(t)&&oE(e,t,n,a),s=r;return o&&(s=lE(t)?.some(e=>oC(e.value,r))?r:void 0),t.const&&i?.constAsDefaults===`always`&&(s=t.const),s}function hE(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:s=void 0,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=Nx(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?VT(e,p,r,f,s):p,h=m[Ix],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=_C(m,[Bx,n],{}),g=Nx(h)&&h[n]!==void 0,_=(Nx(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!cE(p);return rTe(t,n,mE(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:_C(d,[n]),rawFormData:_C(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,m.required,o,_,p?.type===`null`),t},{});if(m.additionalProperties&&!u){let t=Nx(m.additionalProperties)?m.additionalProperties:{},n=new Set;Nx(d)&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e));let p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),n.forEach(n=>{rTe(g,n,mE(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:_C(d,[n]),rawFormData:_C(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,p)})}return pE(t,g)}}function aTe(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:o=void 0,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=t,p=a?.arrayMinItems??{},{populate:m,mergeExtraDefaults:h}=p,g=m===`never`,_=m===`requiredOnly`,v=m===`all`||!g&&!_,y=p?.computeSkipPopulate??(()=>!1),b=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(d)&&(d=d.map((t,c)=>mE(e,fE(f,dE.Fallback,c),{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:t,rawFormData:Array.isArray(n)?n[c]:void 0,required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}))),Array.isArray(n)){let t=fE(f);if(g)d=n;else{let c=n.map((n,c)=>mE(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:_C(d,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));d=iE(d,c,(_&&s||v)&&h)}}if((Nx(f)&&`const`in f&&a?.constAsDefaults!==`never`)===!1){if(g)return d??b;if(_&&!s)return d||void 0}let x,S=Array.isArray(d)?d.length:0;if(!f.minItems||sE(e,f,r,o)||y(e,f,r)||f.minItems<=S)x=d||!s&&!c?d:b;else{let t=d||[],n=fE(f,dE.Invert),c=n.default,u=Array.from({length:f.minItems-S},()=>mE(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));x=t.concat(u)}return pE(t,x)}function gE(e,t,n={},r){switch(LT(t)){case`object`:return hE(e,t,n,r);case`array`:return aTe(e,t,n,r)}}function _E(e,t,n,r,i=!1,a,o,s){if(!Nx(t))throw Error(`Invalid schema: `+t);let c=VT(e,t,r,n,o),l=mE(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&Nx(c.default))return{...l,...n};if(Nx(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:e}=a||{};return iE(l,n,!0,e===`useDefaultIfFormDataUndefined`,!0)}return l}function oTe(e={}){return`widget`in Kx(e)&&Kx(e).widget!==`hidden`}function sTe(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=VT(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function cTe(e,t,n={},r,i,a){let{label:o=!0}=Kx(n,i),s=!!o;if(s){let i=LT(t),o=_C(t,Px,!1);i===`array`&&(s=o||sE(e,t,r,a)||sTe(e,t,n,r,a)||oTe(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n&&n[`ui:field`]&&(s=!1)}return s}function lTe(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=kbe(e,o);n(s,o)&&CC(a,mC(o,e),s)}return a}var uTe=lTe;function dTe(e,t){return uTe(e,t,function(t,n){return Exe(e,n)})}var fTe=dTe,pTe=vwe(function(e,t){return e==null?{}:fTe(e,t)});function vE(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=VT(e,t,r,i,o);if(a.findIndex(e=>oC(e,s))===-1)return vE(e,s,n,r,i,a.concat(s),o)}let s={[cge]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[tE(e,r,i,c,0,FT(t),o)];s={...s,...vE(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1&&wC(s,Ux,!0),`items`in t&&Array.isArray(i)){let{items:c,additionalItems:l}=t;Array.isArray(c)?i.forEach((t,i)=>{c[i]?s[i]=vE(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=vE(e,l,`${n}.${i}`,r,t,a,o):console.warn(`Unable to generate path schema for "${n}.${i}". No schema defined for it`)}):i.forEach((t,i)=>{s[i]=vE(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=_C(t,[Bx,c],{});s[c]=vE(e,l,`${n}.${c}`,r,_C(i,[c]),a,o)}return s}function mTe(e,t,n=``,r,i,a){return vE(e,t,n,r,i,void 0,a)}function hTe(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=pTe(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function yE(e,t){let n=(e,t)=>typeof e!=`object`||vw(e)||t&&!vw(e),r=(e,i=[],a=[[]])=>{let o=Object.keys(e);return o.forEach(s=>{let c=e[s];if(typeof c==`object`){let e=a.map(e=>[...e,s]);c.__rjsf_additionalProperties&&c.$name!==``?i.push(c[cge]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=_C(t,e),a=o.length===1;(n(r,a)||Array.isArray(r)&&r.every(e=>n(e,a)))&&i.push(e)})}),i};return r(e)}function bE(e,t,n={},r){return hTe(r,yE(mTe(e,VT(e,t,n,r),``,n,r),r).map(e=>Array.isArray(e)?e.join(`.`):e))}var xE=Symbol(`no Value`);function SE(e,t,n,r,i={},a){let o;if(vC(n,`properties`)){let s={};if(vC(r,`properties`)){let e=_C(r,Bx,{});Object.keys(e).forEach(e=>{vC(i,e)&&(s[e]=void 0)})}let c=Object.keys(_C(n,Bx,{})),l={};c.forEach(o=>{let c=_C(i,o),u=_C(r,[Bx,o],{}),d=_C(n,[Bx,o],{});vC(u,`$ref`)&&(u=VT(e,u,t,c,a)),vC(d,`$ref`)&&(d=VT(e,d,t,c,a));let f=_C(u,`type`),p=_C(d,`type`);if(!f||f===p)if(vC(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=SE(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=_C(d,`default`,xE),t=_C(u,`default`,xE);e!==xE&&e!==c&&(t===c?s[o]=e:_C(d,`readOnly`)===!0&&(s[o]=void 0));let n=_C(d,`const`,xE),r=_C(u,`const`,xE);n!==xE&&n!==c&&(s[o]=r===c?n:void 0)}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(_C(r,`type`)===`array`&&_C(n,`type`)===`array`&&Array.isArray(i)){let s=_C(r,`items`),c=_C(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){vC(s,`$ref`)&&(s=VT(e,s,t,i,a)),vC(c,`$ref`)&&(c=VT(e,c,t,i,a));let r=_C(s,`type`),l=_C(c,`type`);if(!r||r===l){let r=_C(n,`maxItems`,-1);o=l===`object`?i.reduce((n,i)=>{let o=SE(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]):r>0&&i.length>r?i.slice(0,r):i}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}var gTe=class{constructor(e,t,n,r){t&&t.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=wwe(t,_C(t,`$id`,`#`)):this.rootSchema=t,this.validator=e,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=r}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,t,n={},r){return!e||!t?!1:this.validator!==e||!oC(this.rootSchema,t)||!oC(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return Kwe(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return ZT(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return _E(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return cTe(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return tE(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return Mwe(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return Wwe(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return sTe(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return sE(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return oE(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return bE(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return VT(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return SE(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return mTe(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function _Te(e,t,n={},r){return new gTe(e,t,n,r)}function vTe(e){if(e.indexOf(`data:`)===-1)throw Error(`File is invalid: URI must be a dataURI`);let t=e.slice(5).split(`;base64,`);if(t.length!==2)throw Error(`File is invalid: dataURI must be base64`);let[n,r]=t,[i,...a]=n.split(`;`),o=i||``,s=decodeURI(a.map(e=>e.split(`=`)).find(([e])=>e===`name`)?.[1]||`unknown`);try{let e=atob(r),t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return{blob:new window.Blob([new Uint8Array(t)],{type:o}),name:s}}catch(e){throw Error(`File is invalid: `+e.message)}}function CE(e,t){let n=String(e);for(;n.length<t;)n=`0`+n;return n}function wE(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return wE(t,e).reverse();let n=[];for(let r=e;r<=t;r++)n.push({value:r,label:CE(r,2)});return n}function TE(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function EE(e,t){let n=e;if(Array.isArray(t)){let e=n.split(/(%\d)/);t.forEach((t,n)=>{let r=e.findIndex(e=>e===`%${n+1}`);r>=0&&(e[r]=t)}),n=e.join(``)}return n}function DE(e,t){return EE(e,t)}function OE(e,t=[],n){if(Array.isArray(e))return e.map(e=>OE(e,t)).filter(e=>e!==n);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function yTe(e,t,n=[]){let r=OE(e,n);return Array.isArray(t)?t.filter(e=>!oC(e,r)):oC(r,t)?void 0:t}function kE(e,t){return Array.isArray(t)?t.some(t=>oC(t,e)):oC(t,e)}function AE(e,t=[],n=!1){let r=t.map((t,n)=>kE(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function bTe(e,t,n=[]){let r=OE(e,n);if(!rE(r)){let e=n.findIndex(e=>r===e.value),i=n.map(({value:e})=>e);return t.slice(0,e).concat(r,t.slice(e)).sort((e,t)=>Number(i.indexOf(e)>i.indexOf(t)))}return t}var xTe=1,STe=4;function jE(e){return W(e,xTe|STe)}var ME=jE;function CTe(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:CC(e,t,n,r)}var wTe=CTe,TTe=class{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let t=Array.isArray(e)&&e.length>0||typeof e==`string`?_C(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},wTe(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?ME(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=_C(n,Lx);return Array.isArray(r)||(r=[],n[Lx]=r),Array.isArray(e)?wC(n,Lx,[...new Set([...r,...e])]):wC(n,Lx,[...new Set([...r,e])]),this}setErrors(e,t){return wC(this.getOrCreateErrorBlock(t),Lx,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return wC(this.getOrCreateErrorBlock(e),Lx,[]),this}};function ETe(e,t){if(e==null)return{};var n=uC(Yw(e),function(e){return[e]});return t=Lxe(t),uTe(e,n,function(e,n){return t(e,n[0])})}var NE=ETe,DTe=200;function OTe(e,t,n,r){var i=-1,a=mw,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=uC(t,YS(n))),r?(a=kSe,o=!1):t.length>=DTe&&(a=FS,o=!1,t=new q_e(t));outer:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue outer;c.push(u)}else a(t,d,r)||c.push(u)}return c}var kTe=OTe,ATe=aw(function(e,t){return GC(e)?kTe(e,lw(t,1,GC,!0)):[]});function PE(e,t){let n=rS(e),r=rS(t);if(e===t||!n&&!r)return[];if(n&&!r)return nC(e);if(!n&&r)return nC(t);{let n=nC(NE(e,(e,n)=>!oC(e,_C(t,n)))),r=ATe(nC(t),nC(e));return[...n,...r]}}function jTe(e,t,n=[1900,new Date().getFullYear()+2],r=`YMD`){let{day:i,month:a,year:o,hour:s,minute:c,second:l}=e,u={type:`day`,range:[1,31],value:i},d={type:`month`,range:[1,12],value:a},f={type:`year`,range:n,value:o},p=[];switch(r){case`MDY`:p.push(d,u,f);break;case`DMY`:p.push(u,d,f);break;case`YMD`:default:p.push(f,d,u)}return t&&p.push({type:`hour`,range:[0,23],value:s},{type:`minute`,range:[0,59],value:c},{type:`second`,range:[0,59],value:l}),p}function MTe(e){let t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function NTe(e,t,n={},r=!0){let i={type:t||`text`,...MTe(e)};return n.inputType?i.type=n.inputType:t||(e.type===`number`?(i.type=`number`,r&&i.step===void 0&&(i.step=`any`)):e.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 PTe={props:{disabled:!1},submitText:`Submit`,norender:!1};function FE(e={}){let t=Kx(e);if(t&&t.submitButtonOptions){let e=t[uge];return{...PTe,...e}}return PTe}function IE(e,t,n={}){let{templates:r}=t;return e===`ButtonTemplates`?r[e]:Object.hasOwn(n,e)&&typeof n[e]==`string`&&Object.hasOwn(r,n[e])?r[n[e]]:n[e]||r[e]}var FTe=0;function ITe(e){var t=++FTe;return pC(e)+t}var LE=ITe;function RE(){if(typeof process>`u`||_C(process,`env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,LE(`test-id-`)),e.get(n)}})}var LTe=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isForwardRef=function(e){return m(e)===l},e.isMemo=function(e){return m(e)===f}})),RTe=d(s(((e,t)=>{t.exports=LTe()}))(),1),zTe={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 BTe(e){let t=_C(e,`MergedWidget`);if(!t){let n=e.defaultProps&&e.defaultProps.options||{};t=({options:t,...r})=>(0,j.jsx)(e,{options:{...n,...t},...r}),wC(e,`MergedWidget`,t)}return t}function zE(e,t,n={}){let r=LT(e);if(typeof t==`function`||t&&RTe.isForwardRef((0,A.createElement)(t))||RTe.isMemo(t))return BTe(t);if(typeof t!=`string`)throw Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){let r=n[t];return zE(e,r,n)}if(typeof r==`string`){if(!(r in zTe))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in zTe[r]){let i=n[zTe[r][t]];return zE(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function VTe(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function BE(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function VE(e){return VTe(BE(e))}function HTe(e){return VE(e)}function UTe(e,t,n={}){try{return zE(e,t,n),!0}catch(e){let t=e;if(t.message&&(t.message.startsWith(`No widget`)||t.message.startsWith(`Unsupported widget`)))return!1;throw e}}function HE(e,t){return`${PT(e)?e:e.$id}__${t}`}function UE(e){return HE(e,`description`)}function WTe(e){return HE(e,`error`)}function WE(e){return HE(e,`examples`)}function GTe(e){return HE(e,`help`)}function GE(e){return HE(e,`title`)}function KE(e,t=!1){let n=t?` ${WE(e)}`:``;return`${WTe(e)} ${UE(e)} ${GTe(e)}${n}`}function qE(e,t){return`${e}-${t}`}function JE(e,t){return HE(e,t)}function KTe(e,t){return HE(e,`optional${t}`)}function YE(e){return!rE(e)&&(!mS(e)||Array.isArray(e)||!vw(e))}function qTe(e,t){let{rootSchema:n,schemaUtils:r}=e;return yC(t,n)?!0:`$ref`in n?yC(t,r.retrieveSchema(n)):!1}function XE(e,t,n){return t?n:e}function JTe(e){return e?new Date(e).toJSON():void 0}function YTe(e,t,n){let r=[`layoutGridLookupMap`];return vC(e,`formContext`)&&r.unshift(`formContext`),_C(e,[...r,t],n)}function ZE(e,t){if(!Array.isArray(t))return e;let n=e=>e.reduce((e,t)=>(e[t]=!0,e),{}),r=e=>e.length>1?`properties '${e.join(`', '`)}'`:`property '${e[0]}'`,i=n(e),a=t.filter(e=>e===`*`||i[e]),o=n(a),s=e.filter(e=>!o[e]),c=a.indexOf(`*`);if(c===-1){if(s.length)throw Error(`uiSchema order list does not contain ${r(s)}`);return a}if(c!==a.lastIndexOf(`*`))throw Error(`uiSchema order list contains more than one wildcard item`);let l=[...a];return l.splice(c,1,...s),l}function XTe(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};let n=new Date(e);if(Number.isNaN(n.getTime()))throw Error(`Unable to parse date `+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}var ZTe=[Rx,`additionalProperties`],QTe=[zx,Fx,oge];function QE(e,t,n,r=new Set){let{rootSchema:i,uiSchemaDefinitions:a}=n,o={...t},s=e,c=e[Vx],l=c&&r.has(c);if(c){if(r.add(c),a&&c in a&&(o=aE(a[c],o)),l)return o;try{s=NT(c,i)}catch{s=e}}let u=s[Bx];if(u&&Nx(u))for(let[e,t]of Object.entries(u)){let i=QE(t,o[e]||{},n,new Set(r));Object.keys(i).length>0&&(o[e]=i)}for(let e of ZTe){let t=s[e];if(t&&Nx(t)&&!Array.isArray(t)){let i=o[e];if(typeof i!=`function`){let a=QE(t,i||{},n,new Set(r));Object.keys(a).length>0&&(o[e]=a)}}}for(let e of QTe){let t=s[e];if(Array.isArray(t)&&t.length>0){let i=o[e],a=Array.isArray(i)?[...i]:[],s=!1;for(let e=0;e<t.length;e++){let i=t[e],o=QE(i,a[e]||{},n,new Set(r));Object.keys(o).length>0&&(a[e]=o,s=!0)}s&&(o[e]=a)}}return o}function $Te(e,t,n){let r=e[Vx],i=r?n.uiSchemaDefinitions?.[r]:void 0;return i?!t||Object.keys(t).length===0?{...i}:aE(i,t):t||{}}function $E(e){return e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0?!0:e.anyOf&&e.anyOf.length===1?$E(e.anyOf[0]):e.oneOf&&e.oneOf.length===1?$E(e.oneOf[0]):e.allOf?e.allOf.some(e=>$E(e)):!1}function eEe(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!TE(r,t)||!TE(i,n)}let{props:i,state:a}=e;return!oC(i,t)||!oC(a,n)}function tEe(e){let t=PSe(e.map(e=>mS(e)?LT(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function eD(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=Kx(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?tEe(t[Fx]):`oneOf`in t&&Array.isArray(t.oneOf)?tEe(t[zx]):LT(t),!qTe(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function tD(e,t=!0){let{year:n,month:r,day:i,hour:a=0,minute:o=0,second:s=0}=e,c=Date.UTC(n,r-1,i,a,o,s),l=new Date(c).toJSON();return t?l:l.slice(0,10)}function nD(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[Lx].map(e=>{let n=`.${t.join(`.`)}`;return{property:n,message:e,stack:`${n} ${e}`}}))),Object.keys(e).reduce((n,r)=>{if(r!==`__errors`){let i=e[r];rS(i)&&(n=n.concat(nD(i,[...t,r])))}return n},n)}function rD(e){return HS(e)?uC(e,hC):sC(e)?[e]:qxe(bbe(pC(e)))}var iD=rD;function aD(e){let t=new TTe;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:iD(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function oD(e,t,n,r){let i=Array.isArray(n)?n:n?.path,a=e===``?[]:[e],o=i?i.concat(...a):a,s=[t.idPrefix,...o].join(t.idSeparator),c;return t.nameGenerator&&o.length>0&&(c=t.nameGenerator(o,t.idPrefix,r)),{path:o,$id:s,...c!==void 0&&{name:c}}}function nEe(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;{let r=e[n];return rS(r)?{...t,[n]:nEe(r)}:{...t,[n]:r}}},{})}function rEe(e){return Object.values(e).every(e=>e!==-1)}function iEe(e){let{className:t=`form-control`,type:n,range:r,value:i,select:a,rootId:o,name:s,disabled:c,readonly:l,autofocus:u,registry:d,onBlur:f,onFocus:p}=e,m=`${o}_${n}`,{SelectWidget:h}=d.widgets,g=(0,A.useCallback)(e=>a(n,e),[a,n]);return(0,j.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:wE(r[0],r[1])},placeholder:n,value:i,disabled:c,readonly:l,autofocus:u,onChange:g,onBlur:f,onFocus:p,registry:d,label:``,"aria-describedby":KE(o)})}function aEe(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,A.useState)(XTe(o,t));(0,A.useEffect)(()=>{c(XTe(o,t))},[t,o]);let l=(0,A.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};rEe(r)?a(tD(r,t)):c(r)},[s,a,t]),u=(0,A.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(void 0)},[n,r,a]),d=(0,A.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(tD(XTe(new Date().toJSON(),t),t))},[n,r,t,a]);return{elements:(0,A.useMemo)(()=>jTe(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function sD(e){let t=(0,A.useRef)(e);return yC(e,t.current)||(t.current=e),t.current}function cD(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}function oEe(e){let{name:t,size:n,type:r}=e;return new Promise((i,a)=>{let o=new window.FileReader;o.onerror=a,o.onload=e=>{typeof e.target?.result==`string`?i({dataURL:cD(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function sEe(e){return Promise.all(Array.from(e).map(oEe))}function cEe(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=vTe(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function lEe(e,t,n=!1){let r=(0,A.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,A.useMemo)(()=>cEe(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,A.useCallback)(e=>{sEe(e).then(e=>{let i=e.map(e=>e.dataURL||null);t(n?r.concat(...i):i[0])})},[r,n,t]),handleRemove:(0,A.useCallback)(e=>{t(n?r.filter((t,n)=>n!==e):void 0)},[r,n,t])}}function lD(e){if(!e)return``;let t=new Date(e);return`${CE(t.getFullYear(),4)}-${CE(t.getMonth()+1,2)}-${CE(t.getDate(),2)}T${CE(t.getHours(),2)}:${CE(t.getMinutes(),2)}:${CE(t.getSeconds(),2)}.${CE(t.getMilliseconds(),3)}`}function uD(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=nD(t),o=t;return vw(i)||(o=aE(i,t,n?`preventDuplicates`:!0),a=[...r].concat(a)),{errorSchema:o,errors:a}}function uEe(e){for(let t in e){let n=e,r=n[t];t===`$ref`&&typeof r==`string`&&r.startsWith(`#`)?n[t]=fge+r:n[t]=fEe(r)}return e}function dEe(e){for(let t=0;t<e.length;t++)e[t]=fEe(e[t]);return e}function fEe(e){return Array.isArray(e)?dEe([...e]):mS(e)?uEe({...e}):e}var dD;(function(e){e.ArrayItemTitle=`Item`,e.MissingItems=`Missing items definition`,e.EmptyArray=`No items yet. Use the button below to add some.`,e.YesLabel=`Yes`,e.NoLabel=`No`,e.CloseLabel=`Close`,e.ErrorsLabel=`Errors`,e.NewStringDefault=`New Value`,e.AddButton=`Add`,e.AddItemButton=`Add Item`,e.CopyButton=`Copy`,e.MoveDownButton=`Move down`,e.MoveUpButton=`Move up`,e.RemoveButton=`Remove`,e.NowLabel=`Now`,e.ClearLabel=`Clear`,e.AriaDateLabel=`Select a date`,e.PreviewLabel=`Preview`,e.DecrementAriaLabel=`Decrease value by 1`,e.IncrementAriaLabel=`Increase value by 1`,e.OptionalObjectAdd=`Add data for optional field`,e.OptionalObjectRemove=`Remove data for optional field`,e.OptionalObjectEmptyMsg=`No data for optional field`,e.Type=`Type`,e.Value=`Value`,e.ClearButton=`clear input`,e.UnknownFieldType=`Unknown field type %1`,e.OptionPrefix=`Option %1`,e.TitleOptionPrefix=`%1 option %2`,e.KeyLabel=`%1 Key`,e.InvalidObjectField=`Invalid "%1" object field configuration: _%2_.`,e.UnsupportedField=`Unsupported field schema.`,e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason=`Unsupported field schema: _%1_.`,e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo=`**%1** (%2, %3 bytes)`})(dD||={});function fD(e,t){return(HS(e)?jC:QT)(e,Gbe(t))}var pEe=fD;function mEe(e,t){return e==null?!0:mwe(e,t)}var hEe=mEe;function pD(){return LE(`rjsf-array-item-`)}function mD(e){return Array.isArray(e)?e.map(e=>({key:pD(),item:e})):[]}function gEe(e){return Array.isArray(e)?e.map(e=>e.item):[]}function _Ee(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function hD(e,t,n,r){let{addable:i}=Kx(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0?!0:n.length<t.maxItems),i}function vEe(e,t,n,r){if(typeof e.items==`function`)try{return e.items(t,n,r)}catch(e){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,e);return}else return e.items}function yEe(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:nE(t)&&ige(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function bEe(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,placeholder:l,onBlur:u,onFocus:d,registry:f,rawErrors:p,name:m,onSelectChange:h}=e,{widgets:g,schemaUtils:_,globalFormOptions:v,globalUiOptions:y}=f,b=lE(_.retrieveSchema(t.items,i),r),{widget:x=`select`,title:S,...C}=Kx(r,y),w=zE(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=sD(oD(``,v,n,!0));return(0,j.jsx)(w,{id:D.$id,name:m,multiple:!0,onChange:h,onBlur:u,onFocus:d,options:{...C,enumOptions:b},schema:t,uiSchema:r,registry:f,value:i,disabled:a,readonly:o,required:c,label:T,hideLabel:!E,placeholder:l,autofocus:s,rawErrors:p,htmlName:D.name})}function xEe(e){let{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:a=!1,autofocus:o=!1,required:s=!1,hideError:c,placeholder:l,onBlur:u,onFocus:d,formData:f=[],registry:p,rawErrors:m,name:h,onSelectChange:g}=e,{widgets:_,schemaUtils:v,globalFormOptions:y,globalUiOptions:b}=p,{widget:x,title:S,...C}=Kx(r,b),w=zE(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=sD(oD(``,y,n,!0));return(0,j.jsx)(w,{id:D.$id,name:h,multiple:!0,onChange:g,onBlur:u,onFocus:d,options:C,schema:t,uiSchema:r,registry:p,value:f,disabled:i,readonly:a,hideError:c,required:s,label:T,hideLabel:!E,placeholder:l,autofocus:o,rawErrors:m,htmlName:D.name})}function gD(e){let{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,onBlur:l,onFocus:u,registry:d,formData:f=[],rawErrors:p,onSelectChange:m}=e,{widgets:h,schemaUtils:g,globalFormOptions:_,globalUiOptions:v}=d,{widget:y=`files`,title:b,...x}=Kx(n,v),S=zE(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=sD(oD(``,_,r,!0));return(0,j.jsx)(S,{options:x,id:T.$id,name:i,multiple:!0,onChange:m,onBlur:l,onFocus:u,schema:t,uiSchema:n,value:f,disabled:a,readonly:o,required:c,registry:d,autofocus:s,rawErrors:p,label:C,hideLabel:!w,htmlName:T.name})}function _D(e){let{itemKey:t,index:n,name:r,disabled:i,hideError:a,readonly:o,registry:s,uiOptions:c,parentUiSchema:l,canAdd:u,canRemove:d=!0,canMoveUp:f,canMoveDown:p,itemSchema:m,itemData:h,itemUiSchema:g,itemFieldPathId:_,itemErrorSchema:v,autofocus:y,onBlur:b,onFocus:x,onChange:S,rawErrors:C,totalItems:w,title:T,handleAddItem:E,handleCopyItem:D,handleRemoveItem:O,handleReorderItems:k}=e,{schemaUtils:ee,fields:{ArraySchemaField:te,SchemaField:ne},globalUiOptions:re}=s,ie=sD(_),ae=te||ne,oe=IE(`ArrayFieldItemTemplate`,s,c),se=ee.getDisplayLabel(m,g,re),{description:ce}=Kx(g),le=!!ce||!!m.description,{orderable:ue=!0,removable:de=!0,copyable:fe=!1}=c,pe={moveUp:ue&&f,moveDown:ue&&p,copy:fe&&u,remove:de&&d,toolbar:!1};pe.toolbar=Object.keys(pe).some(e=>pe[e]);let me=(0,A.useCallback)(e=>{E(e,n+1)},[E,n]),he=(0,A.useCallback)(e=>{D(e,n)},[D,n]),ge=(0,A.useCallback)(e=>{O(e,n)},[O,n]),_e=(0,A.useCallback)(e=>{k(e,n,n-1)},[k,n]),ve=(0,A.useCallback)(e=>{k(e,n,n+1)},[k,n]);return(0,j.jsx)(oe,{children:(0,j.jsx)(ae,{name:r,title:T,index:n,schema:m,uiSchema:g,formData:h,errorSchema:v,fieldPathId:ie,required:_Ee(m),onChange:S,onBlur:b,onFocus:x,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:C}),buttonsProps:{fieldPathId:ie,disabled:i,readonly:o,canAdd:u,hasCopy:pe.copy,hasMoveUp:pe.moveUp,hasMoveDown:pe.moveDown,hasRemove:pe.remove,index:n,totalItems:w,onAddItem:me,onCopyItem:he,onRemoveItem:ge,onMoveUpItem:_e,onMoveDownItem:ve,registry:s,schema:m,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:pe.toolbar,index:n,totalItems:w,readonly:o,registry:s,schema:m,uiSchema:g,parentUiSchema:l,displayLabel:se,hasDescription:le})}function vD(e){let{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,onChange:_,keyedFormData:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,C=t.title||s||o,{schemaUtils:w,fields:T,formContext:E,globalFormOptions:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=T,ee=Kx(n,O),te=mS(t.items)?t.items:{},ne=w.retrieveSchema(te),re=gEe(v),ie=eD(p,t,d,n),ae=YE(a),oe=hD(p,t,re,n)&&(!ie||ae),se=ae?v:[],ce=ie?` rjsf-optional-array-field`:``,le=e.childFieldPathId??i,ue=ie?(0,j.jsx)(k,{...e,fieldPathId:le}):void 0,de={canAdd:oe,items:se.map((e,t)=>{let{key:i,item:a}=e,s=a,T=w.retrieveSchema(te,s),O=r?r[t]:void 0,k=oD(t,D,le),ne=vEe(n,a,t,E);return(0,j.jsx)(_D,{itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:ee,hideError:f,readonly:l,disabled:c,required:d,title:C?`${C}-${t+1}`:void 0,canAdd:oe,canMoveUp:t>0,canMoveDown:t<re.length-1,itemSchema:T,itemFieldPathId:k,itemErrorSchema:O,itemData:s,itemUiSchema:ne,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S,onChange:_},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${ne.type}${ce}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:C,formData:re,rawErrors:g,registry:p,optionalDataControl:ue};return(0,j.jsx)(IE(`ArrayFieldTemplate`,p,ee),{...de})}function yD(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,keyedFormData:_,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,{formData:C=[]}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalFormOptions:O,globalUiOptions:k}=p,ee=Kx(n,k),{OptionalDataControlsField:te}=E,ne=eD(p,t,d,n),re=YE(r),ie=(mS(t.items)?t.items:[]).map((e,t)=>T.retrieveSchema(e,C[t])),ae=mS(t.additionalItems)?T.retrieveSchema(t.additionalItems,r):null,oe=e.childFieldPathId??a;C.length<ie.length&&(C=C.concat(Array(ie.length-C.length)));let se=re?_:[],ce=ne?` rjsf-optional-array-field`:``,le=ne?(0,j.jsx)(te,{...e,fieldPathId:oe}):void 0,ue=hD(p,t,C,n)&&!!ae&&(!ne||re),de={canAdd:ue,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${ce}`,disabled:c,fieldPathId:a,formData:r,items:se.map((e,r)=>{let{key:a,item:s}=e,E=s,k=r>=ie.length,te=(k&&mS(t.additionalItems)?T.retrieveSchema(t.additionalItems,E):ie[r])||{},ne=oD(r,O,oe),re;re=k?n.additionalItems:Array.isArray(n.items)?n.items[r]:vEe(n,s,r,D);let ae=i?i[r]:void 0;return(0,j.jsx)(_D,{index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:ee,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${r+1}`:void 0,canAdd:ue,canRemove:k,canMoveUp:r>=ie.length+1,canMoveDown:k&&r<C.length-1,itemSchema:te,itemData:E,itemUiSchema:re,itemFieldPathId:ne,itemErrorSchema:ae,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:w,errorSchema:i,rawErrors:g,optionalDataControl:le};return(0,j.jsx)(IE(`ArrayFieldTemplate`,p,ee),{...de})}function bD(e=[]){let t=(0,A.useMemo)(()=>VE(e),[e]),[n,r]=(0,A.useState)(()=>({formDataHash:t,keyedFormData:mD(e)})),{keyedFormData:i,formDataHash:a}=n;if(t!==a){let n=Array.isArray(e)?e:[],o=i||[];i=n.length===o.length?o.map((e,t)=>({key:e.key,item:n[t]})):mD(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,A.useCallback)(e=>{let t=gEe(e);return r({formDataHash:VE(t),keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function xD(e){let{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:a,formData:o,onChange:s}=e,{globalFormOptions:c,schemaUtils:l,translateString:u}=a,{keyedFormData:d,updateKeyedFormData:f}=bD(o),p=e.childFieldPathId??i,m=(0,A.useCallback)((e,n)=>{e&&e.preventDefault();let i;if(r)for(let e in i={},r){let t=parseInt(e);n===void 0||t<n?wC(i,[t],r[e]):t>=n&&wC(i,[t+1],r[e])}let o={key:pD(),item:yEe(a,t)},c=[...d];n===void 0?c.push(o):c.splice(n,0,o),s(f(c),p.path,i)},[d,a,t,s,f,r,p]),h=(0,A.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r)for(let e in n={},r){let i=parseInt(e);i<=t?wC(n,[i],r[e]):i>t&&wC(n,[i+1],r[e])}let i={key:pD(),item:ME(d[t].item)},a=[...d];t===void 0?a.push(i):a.splice(t+1,0,i),s(f(a),p.path,n)},[d,s,f,r,p]),g=(0,A.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r)for(let e in n={},r){let i=parseInt(e);i<t?wC(n,[i],r[e]):i>t&&wC(n,[i-1],r[e])}s(f(d.filter((e,n)=>n!==t)),p.path,n)},[d,s,f,r,p]),_=(0,A.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let i;if(r)for(let e in i={},r){let a=parseInt(e);a==t?wC(i,[n],r[t]):a==n?wC(i,[t],r[n]):wC(i,[e],r[a])}function a(){let e=d.slice();return e.splice(t,1),e.splice(n,0,d[t]),e}s(f(a()),p.path,i)},[d,s,f,r,p]),v=(0,A.useCallback)((e,t,n,r)=>{s(e===void 0?null:e,t,n,r)},[s]),y=(0,A.useCallback)(e=>{s(e,p.path,void 0,p?.$id)},[s,p]),b={...e,formData:o,fieldPathId:p,onSelectChange:y},x={...e,handleAddItem:m,handleCopyItem:h,handleRemoveItem:g,handleReorderItems:_,keyedFormData:d,onChange:v};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,j.jsx)(IE(`UnsupportedFieldTemplate`,a,Kx(n)),{schema:t,fieldPathId:i,reason:u(dD.MissingItems),registry:a});let e={...t,[Rx]:{type:void 0}};b.schema=e,x.schema=e}return l.isMultiSelect(b.schema)?(0,j.jsx)(bEe,{...b}):oTe(n)?(0,j.jsx)(xEe,{...b}):nE(b.schema)?(0,j.jsx)(yD,{...x}):l.isFilesArray(b.schema,n)?(0,j.jsx)(gD,{...b}):(0,j.jsx)(vD,{...x})}function SEe(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,registry:o,required:s,disabled:c,readonly:l,hideError:u,autofocus:d,title:f,onChange:p,onFocus:m,onBlur:h,rawErrors:g}=e,{title:_}=t,{widgets:v,translateString:y,globalUiOptions:b}=o,{widget:x=`checkbox`,title:S,label:C=!0,enumNames:w,...T}=Kx(r,b),E=zE(t,x,v),D=y(dD.YesLabel),O=y(dD.NoLabel),k,ee=S??_??f??n;if(Array.isArray(t.oneOf))k=lE({oneOf:t.oneOf.map(e=>{if(mS(e))return{...e,title:e.title||(e.const===!0?D:O)}}).filter(e=>e)},r);else{let e=t.enum??[!0,!1];k=!w&&e.length===2&&e.every(e=>typeof e==`boolean`)?[{value:e[0],label:e[0]?D:O},{value:e[1],label:e[1]?D:O}]:lE({enum:e},r)}let te=(0,A.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,j.jsx)(E,{options:{...T,enumOptions:k},schema:t,uiSchema:r,id:i.$id,name:n,onChange:te,onFocus:m,onBlur:h,label:ee,hideLabel:!C,value:a,required:s,disabled:c,readonly:l,hideError:u,registry:o,autofocus:d,rawErrors:g,htmlName:i.name})}var CEe=SEe;function wEe(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function TEe(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function EEe(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function DEe(e){let{id:t,formData:n,displayLabel:r=!0,schema:i,name:a,uiSchema:o,required:s,disabled:c=!1,readonly:l=!1,onBlur:u,onFocus:d,registry:f,fieldPathId:p,onChange:m,errorSchema:h}=e,{translateString:g,fields:_,globalFormOptions:v}=f,[y,b]=(0,A.useState)(TEe(n)),x=Kx(o),S=sD(oD(`__internal_type_selector`,v,p)),C=g(dD.Type),w=(0,A.useMemo)(()=>wEe(C),[C]),T=e=>{e!=null&&(b(e),m(EEe(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(dD.UnknownFieldType,[String(i.type)])}=e;return(0,j.jsx)(IE(`UnsupportedFieldTemplate`,f,x),{schema:i,fieldPathId:p,reason:t,registry:f})}let E=IE(`FallbackFieldTemplate`,f,x),{SchemaField:D}=_;return(0,j.jsx)(E,{schema:i,registry:f,typeSelector:(0,j.jsx)(D,{fieldPathId:S,name:`${a}__fallback_type`,schema:w,formData:y,onChange:T,onBlur:u,onFocus:d,registry:f,hideLabel:!r,disabled:c,readonly:l,required:s},n?VE(n):`__empty__`),schemaField:(0,j.jsx)(D,{...e,schema:{type:y,title:g(dD.Value),...y===`object`&&{additionalProperties:!0}}})})}function OEe(e,t){return uC(t,function(t){return e[t]})}var kEe=OEe;function AEe(e){return e==null?[]:kEe(e,nC(e))}var jEe=AEe,MEe=Math.max;function NEe(e,t,n,r){e=eC(e)?e:jEe(e),n=n&&!r?oxe(n):0;var i=e.length;return n<0&&(n=MEe(i+n,0)),PT(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&fw(e,t,n)>-1}var PEe=NEe,FEe=Math.min;function IEe(e,t,n){for(var r=n?kSe:mw,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=uC(u,YS(t))),c=FEe(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new q_e(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d<i&&l.length<c;){var p=u[d],m=t?t(p):p;if(p=n||p!==0?p:0,!(f?FS(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?FS(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}var LEe=IEe;function REe(e){return GC(e)?e:[]}var zEe=REe,BEe=aw(function(e){var t=uC(e,zEe);return t.length&&t[0]===e[0]?LEe(t):[]});function VEe(e){return e===void 0}var HEe=VEe,SD;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(SD||={});var UEe;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(UEe||={});const CD=/^\$lookup=(.+)/,wD=`layoutGrid`;`${wD}`;function WEe(e,t){return e??t}function GEe(e){return/^\d+?$/.test(e)}var TD=RE();function KEe(e,t,n,r,i){let a=_C(n,[Gx],{}),o=_C(n,e),s={..._C(o,[Wx],{}),...t,...a},c={...o};vw(s)||wC(c,[Wx],s),vw(a)||wC(c,[Gx],a);let{readonly:l}=Kx(c);return(i===!0||HEe(l)&&r===!0)&&(l=!0,vC(s,`readonly`)?wC(c,[Wx,lge],!0):wC(c,`ui:${lge}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function qEe(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=OT([t]).sort(),i=OT([n]).sort();switch(e){case UEe.ALL:return yC(r,i);case UEe.SOME:return BEe(r,i).length>0;case UEe.NONE:return BEe(r,i).length===0;default:return!1}}function ED(e,t,n){let r={},i=e[t];if(rS(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>YTe(n,e,e)).join(` `);r={...a,className:e}}else r=a}if(!Array.isArray(i))throw TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function DD(e,t,n){let r;if(GEe(n)&&e&&e?.type===`array`&&vC(e,`items`)){let i=Number(n),a=e[Rx];r=Array.isArray(a)?i>a.length?CT(a):a[i]:a,t={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function JEe(e,t,n,r,i){let{schemaUtils:a,globalFormOptions:o}=e,s=n,c=i,l=t.split(`.`),u=l.pop(),d=a.retrieveSchema(s,r),f=r,p=d.readOnly;l.forEach(e=>{if(c=oD(e,o,c),vC(d,`properties`))s=_C(d,[Bx,e],{});else if(d&&(vC(d,`oneOf`)||vC(d,`anyOf`))){let t=vC(d,`oneOf`)?zx:Fx;s=_C(a.findSelectedOptionInXxxOf(d,e,t,f),[Bx,e],{})}else{let t=DD(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=_C(f,e,{}),d=a.retrieveSchema(s,f),p=WEe(d.readOnly,p)});let m,h=!1;if(vw(d)&&(d=void 0),d&&u){if(d&&(vC(d,`oneOf`)||vC(d,`anyOf`))){let e=vC(d,`oneOf`)?zx:Fx;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=oD(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&PEe(d.required,u);let e=DD(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=_C(d,[Bx,u]),d&&=a.retrieveSchema(d)),p=WEe(d?.readOnly,p),d&&(vC(d,`oneOf`)||vC(d,`anyOf`))){let e=vC(d,`oneOf`)?zx:Fx,t=FT(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function YEe(e,t){let n=e;return PT(n)&&(n=YTe(t,n)),_S(n)?n:null}function XEe(e,t){let n,r=null,i={},a;if(PT(t)||HEe(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,vw(i)||pEe(i,(t,n)=>{if(PT(t)){let r=CD.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=YTe(e,t,t)}}}),r=YEe(s,e),!o&&r&&(a=(0,j.jsx)(r,{...c,"data-testid":TD.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function OD(e){let{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:a}=n,{schemaUtils:o}=r,s=o.retrieveSchema(i,a);return t.map(e=>(0,A.createElement)($Ee,{...n,key:`layoutGrid-${VE(e)}`,schema:s,layoutGridSchema:e}))}function kD(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=ED(t,SD.CONDITION,i),{operator:s,field:c=``,value:l}=o;return qEe(s,_C(r,c,null),l)?(0,j.jsx)(OD,{...n,childrenLayoutGridSchemaId:a}):null}function ZEe(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=ED(t,SD.COLUMN,r);return(0,j.jsx)(IE(`GridTemplate`,r,Kx(i)),{column:!0,"data-testid":TD.col,...o,children:(0,j.jsx)(OD,{...n,childrenLayoutGridSchemaId:a})})}function AD(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=ED(t,SD.COLUMNS,r),s=IE(`GridTemplate`,r,Kx(i));return a.map(e=>(0,j.jsx)(s,{column:!0,"data-testid":TD.col,...o,children:(0,j.jsx)(OD,{...n,childrenLayoutGridSchemaId:[e]})},`column-${VE(e)}`))}function jD(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=ED(t,SD.ROW,r);return(0,j.jsx)(IE(`GridTemplate`,r,Kx(i)),{...o,"data-testid":TD.row,children:(0,j.jsx)(OD,{...n,childrenLayoutGridSchemaId:a})})}function QEe(e){let{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:a,onBlur:o,onFocus:s,formData:c,readonly:l,registry:u,layoutGridSchema:d,...f}=e,{onChange:p}=f,{fields:m}=u,{SchemaField:h,LayoutMultiSchemaField:g}=m,_=XEe(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=JEe(u,v,n,c,a),E=sD(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=KEe(v,b,r,C,l);return(0,j.jsx)(e,{"data-testid":w?.hasDiscriminator?TD.layoutMultiSchemaField:TD.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:_C(i,v),fieldPathId:E,formData:_C(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,j.jsx)(y,{"data-testid":TD.uiComponent,...f,name:v,required:S,formData:c,readOnly:!!C||l,errorSchema:i,uiSchema:r,schema:n,fieldPathId:a,onBlur:o,onFocus:s,registry:u,...b}):null}function $Ee(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=Kx(t);if(!n&&`layoutGrid`in r&&mS(r.layoutGrid)&&(n=r[wD]),mS(n)){if(SD.ROW in n)return(0,j.jsx)(jD,{...e,layoutGridSchema:n});if(SD.COLUMN in n)return(0,j.jsx)(ZEe,{...e,layoutGridSchema:n});if(SD.COLUMNS in n)return(0,j.jsx)(AD,{...e,layoutGridSchema:n});if(SD.CONDITION in n)return(0,j.jsx)(kD,{...e,layoutGridSchema:n})}return(0,j.jsx)(QEe,{...e,gridSchema:n})}$Ee.TEST_IDS=TD;function eDe(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=Kx(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,j.jsx)(IE(`TitleFieldTemplate`,o,c),{id:GE(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function tDe(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=_C(e,[Bx,t]);return _C(r,sge,_C(r,Ix,`!@#!@$@#$!@$#`))===n})}function MD(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;vC(e,`oneOf`)?o={...e,[zx]:a}:vC(e,`anyOf`)&&(o={...e,[Fx]:a});let s=lE(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function nDe(e){let{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:a,onBlur:o,onChange:s,options:c,onFocus:l,registry:u,uiSchema:d,schema:f,autofocus:p,readonly:m,required:h,errorSchema:g,hideError:_=!1}=e,{widgets:v,schemaUtils:y,globalUiOptions:b}=u,[x,S]=(0,A.useState)(MD(f,c,y,d,i)),C=_C(a,`$id`),w=FT(f),T=IE(`FieldErrorTemplate`,u,c),E=IE(`FieldTemplate`,u,c);(0,A.useEffect)(()=>{S(MD(f,c,y,d,i))},[VE(f),VE(c),y,d?VE(d):``,i?VE(i):``]);let{widget:D=w?`radio`:`select`,title:O=``,placeholder:k=``,optionsSchemaSelector:ee=w,hideError:te,...ne}=Kx(d);if(!ee)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let re=_C(i,ee),ie=_C(x[0]?.schema,[Bx,ee],{}),ae=tDe(x,ee,re);ie=ie?.type?ie:{...ie,type:ae?.type||n};let oe=zE(ie,D,v),se=te===void 0?_:!!te,ce=_C(g,[Lx],[]),le=AT(g,[Lx]),ue=y.getDisplayLabel(f,d,b),de=e=>{let t=tDe(x,ee,e),n=tDe(x,ee,re),r=y.sanitizeDataForNewSchema(t,n,i);r&&t&&(r=y.getDefaultFormState(t,r,`excludeObjectChildren`)),r&&wC(r,ee,e),s(r,a.path,void 0,C)},fe={enumOptions:x,...ne},pe=!se&&ce.length>0?(0,j.jsx)(T,{fieldPathId:a,schema:f,errors:ce,registry:u}):void 0;return(0,j.jsx)(E,{fieldPathId:a,id:C,schema:f,label:(O||f.title)??``,disabled:r||Array.isArray(x)&&vw(x),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:ue,errors:pe,onChange:s,onKeyRename:hw,onKeyRenameBlur:hw,onRemoveProperty:hw,children:(0,j.jsx)(oe,{id:C,name:t,schema:f,label:(O||f.title)??``,disabled:r||Array.isArray(x)&&vw(x),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:ce,hideError:se,hideLabel:!ue,errorSchema:le,placeholder:k,onChange:de,onBlur:o,onFocus:l,value:re,options:fe,htmlName:a.name})})}var rDe=class extends A.Component{constructor(e){super(e);let{formData:t,options:n,registry:{schemaUtils:r}}=this.props,i=n.map(e=>r.retrieveSchema(e,t));this.state={retrievedOptions:i,selectedOption:this.getMatchingOption(0,t,i)}}componentDidUpdate(e,t){let{formData:n,options:r,fieldPathId:i}=this.props,{selectedOption:a}=this.state,o=this.state;if(!oC(e.options,r)){let{registry:{schemaUtils:e}}=this.props;o={selectedOption:a,retrievedOptions:r.map(t=>e.retrieveSchema(t,n))}}if(!oC(n,e.formData)&&i.$id===e.fieldPathId.$id){let{retrievedOptions:e}=o,r=this.getMatchingOption(a,n,e);t&&r!==a&&(o={selectedOption:r,retrievedOptions:e})}o!==this.state&&this.setState(o)}getMatchingOption(e,t,n){let{schema:r,registry:{schemaUtils:i}}=this.props,a=FT(r);return i.getClosestMatchingOption(t,n,e,a)}onOptionChange=e=>{let{selectedOption:t,retrievedOptions:n}=this.state,{formData:r,onChange:i,registry:a,fieldPathId:o}=this.props,{schemaUtils:s}=a,c=e===void 0?-1:parseInt(e,10);if(c===t)return;let l=c>=0?n[c]:void 0,u=t>=0?n[t]:void 0,d=s.sanitizeDataForNewSchema(l,u,r);l&&(d=s.getDefaultFormState(l,d,`excludeObjectChildren`)),this.setState({selectedOption:c},()=>{i(d,o.path,void 0,this.getFieldId())})};getFieldId(){let{fieldPathId:e,schema:t}=this.props;return`${e.$id}${t.oneOf?`__oneof_select`:`__anyof_select`}`}render(){let{name:e,disabled:t=!1,errorSchema:n={},formData:r,onBlur:i,onFocus:a,readonly:o,required:s=!1,registry:c,schema:l,uiSchema:u}=this.props,{widgets:d,fields:f,translateString:p,globalUiOptions:m,schemaUtils:h}=c,{SchemaField:g}=f,_=IE(`MultiSchemaFieldTemplate`,c,m),v=eD(c,l,s,u),y=YE(r),{selectedOption:b,retrievedOptions:x}=this.state,{widget:S=`select`,placeholder:C,autofocus:w,autocomplete:T,title:E=l.title,...D}=Kx(u,m),O=zE({type:`number`},S,d),k=_C(n,Lx,[]),ee=AT(n,[Lx]),te=h.getDisplayLabel(l,u,m),ne=b>=0&&x[b]||null,re;if(ne){let{required:e}=l;re=e?RT({required:e},ne):ne}let ie=[];`oneOf`in l&&u&&`oneOf`in u?Array.isArray(u.oneOf)?ie=u[zx]:console.warn(`uiSchema.oneOf is not an array for "${E||e}"`):`anyOf`in l&&u&&`anyOf`in u&&(Array.isArray(u.anyOf)?ie=u[Fx]:console.warn(`uiSchema.anyOf is not an array for "${E||e}"`));let ae=u;b>=0&&ie.length>b&&(ae=ie[b]);let oe=E?dD.TitleOptionPrefix:dD.OptionPrefix,se=E?[E]:[],ce=x.map((e,t)=>{let{title:n=e.title}=Kx(ie[t]);return{label:n||p(oe,se.concat(String(t+1))),value:t}});return(0,j.jsx)(_,{schema:l,registry:c,uiSchema:u,selector:!v||y?(0,j.jsx)(O,{id:this.getFieldId(),name:`${e}${l.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:this.onOptionChange,onBlur:i,onFocus:a,disabled:t||vw(ce),multiple:!1,rawErrors:k,errorSchema:ee,value:b>=0?b:void 0,options:{enumOptions:ce,...D},registry:c,placeholder:C,autocomplete:T,autofocus:w,label:E??e,hideLabel:!te,readonly:o}):void 0,optionSchemaField:re&&re.type!==`null`&&(0,j.jsx)(g,{...this.props,schema:re,uiSchema:ae})||null})}},iDe=/\.([0-9]*0)*$/,ND=/[0.]0*$/;function aDe(e){let{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=(0,A.useState)(i),{StringField:s}=t.fields,c=r,l=(0,A.useCallback)((e,t,r,i)=>{o(e),`${e}`.charAt(0)===`.`&&(e=`0${e}`),n(typeof e==`string`&&e.match(iDe)?age(e.replace(ND,``)):age(e),t,r,i)},[n]);if(typeof a==`string`&&typeof c==`number`){let e=RegExp(`^(${String(c).replace(`.`,`\\.`)})?\\.?0*$`);a.match(e)&&(c=a)}return(0,j.jsx)(s,{...e,formData:c,onChange:l})}var oDe=aDe;function PD(){return PD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PD.apply(null,arguments)}var FD=[`strong`,`em`,`del`,`mark`],ID=[[`**`,FD[0]],[`__`,FD[0]],[`~~`,FD[2]],[`==`,FD[3]],[`*`,`em`],[`_`,`em`]];function LD(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]===`\\`?r+=2:(e[r]===`[`&&n++,e[r]===`]`&&n--,r++);if(n===0&&r<e.length&&(e[r]===`(`||e[r]===`[`)){var i=e[r]===`(`?`)`:`]`,a=1;for(r++;r<e.length&&a>0;)e[r]===`\\`?r+=2:(e[r]===`(`&&i===`)`&&a++,e[r]===i&&a--,r++);if(a===0)return r}return-1}function RD(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!==`*`&&n!==`_`&&n!==`~`&&n!==`=`)return null;for(var r=``,i=0,a=``,o=0;o<6;o++){var s=ID[o][0];if(e.startsWith(s)&&e.length>=2*s.length){r=s,i=s.length,a=ID[o][1];break}}if(!r)return null;for(var c=i,l=!1,u=!1,d=``,f=0,p=``,m=!1,h=``;c<e.length;){var g=e[c];if(m)p+=g,m=!1,h=g,c++;else if(g!==`\\`)if(g!=="`"||f!==0){if(g===`[`&&!l&&f===0){var _=LD(e,c);if(_!==-1){p+=e.slice(c,_),c=_,h=e[_-1];continue}}if(u)p+=g,d?g===d&&(d=``):g===`"`||g===`'`?d=g:g===`>`&&(u=!1),h=g,c++;else if(g!==`<`||l){if(g===`
|
|
69
69
|
`&&h===`
|
|
70
70
|
`&&!l&&f===0)return null;if(!l&&f===0){for(var v=0;c+v<e.length&&e[c+v]===r[0];)v++;if(v>=i&&(i!==1||r!==`*`&&r!==`_`||e[c-1]!==r&&e[c+1]!==r)){var y=[e.slice(0,c+v),a,p+e.slice(c+i,c+v)];return y.index=0,y.input=e,y}}p+=g,h=g,c++}else{var b=e[c+1],x=e.indexOf(`>`,c);if(x!==-1){var S=e.slice(c,x+1).endsWith(`/>`);b===`/`?f=Math.max(0,f-1):S||f++}u=!0,p+=g,h=g,c++}}else l=!l,p+=g,h=g,c++;else p+=g,m=!0,h=g,c++}return null}var zD=[`children`,`options`],sDe=`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`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),cDe={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},lDe=[`style`,`script`,`pre`],uDe=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],BD=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,dDe=/\n{2,}$/,VD=/^(\s*>[\s\S]*?)(?=\n\n|$)/,fDe=/^ *> ?/gm,pDe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,mDe=/^ {2,}\n/,hDe=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,HD=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,gDe=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,_De=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,vDe=/^(?:\n *)*\n/,yDe=/\r\n?/g,bDe=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,xDe=/^\[\^([^\]]+)]/,SDe=/\f/g,CDe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,UD=/^\[(x|\s)\]/,wDe=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,TDe=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,EDe=/^([^\n]+)\n *(=|-)\2{2,} *\n/,DDe=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function ODe(e){let t=DDe.exec(e);if(!t)return null;let n=t[1],r=n.toLowerCase(),i=r.length+1,a=t[0].length;e[a]===`
|
|
@@ -182,7 +182,7 @@ Tool usage rules:
|
|
|
182
182
|
- Never stuff unrelated information into the wrong field.
|
|
183
183
|
- Keep responses concise.`),n?.agents?.length&&(i+=`
|
|
184
184
|
|
|
185
|
-
When calling a sub-agent, provide a short session name that describes the task. Use the same session name to continue a previous conversation with that agent. Use a new session name for a new independent task. When a request involves multiple actions for the same domain, combine them into a single sub-agent call rather than making separate calls.`),i}function iW(e,t,n){let r=[];return{channelId:`${e.channelId}:${t}:${n}`,openingData:e.openingData,get state(){return e.state},get approvals(){return r},close:()=>{},sendBinary:t=>e.sendBinary(t),send:i=>{if(i.type!==`done`){if(i.type===`approval-request`){r.push({toolCallId:i.toolCallId,toolName:i.toolName,args:i.args,runId:i.runId});return}i.type===`step-start`||i.type===`text-delta`||i.type===`reasoning-delta`||i.type===`tool-call`||i.type===`tool-result`||i.type===`usage`||i.type===`error`||i.type===`workflow-created`?e.send({...i,agent:t,session:n}):e.send(i)}},setState:t=>e.setState(t),getState:()=>e.getState(),clearState:()=>e.clearState()}}async function z0e(e,t,n,r,i,a,o,s){let c=HU(),l=[],u=[],d=a?.options?.requiresToolApproval??`explicit`,f=BU(i,`agent`,`agentsMeta`)[r];if(!f)return{tools:l,missingRpcs:u};let p=e.sessionService?await e.sessionService.get():null,m=f.tools,h=f.agents;if(m?.length)for(let t of m){let n,r=null,i,a=t.includes(`:`)?G0e(t):null,o;if(a)r=a.package,o=a.function,n=BU(r,`function`,`meta`)[o],i=BU(r,`misc`,`schemas`);else{if(o=BU(null,`rpc`,`meta`)[t],!o){u.push(t);continue}n=BU(null,`function`,`meta`)[o],i=BU(null,`misc`,`schemas`)}if(!n){u.push(t);continue}if(n.permissions?.length&&(!p||!await t0e(n.permissions,p,c,r)))continue;let s=n?.inputSchemaName,f=s?i.get(s):void 0;(!f||typeof f==`object`&&f.type===`object`&&!f.properties)&&(f={type:`object`,properties:{}});let m=d===`all`||d===`explicit`&&n?.approvalRequired,h;if(m&&o){let e=BU(r,`function`,`functions`).get(o);if(e?.approvalDescription){let t=e.approvalDescription,n=r;h=async e=>{let r=c;if(n){let e=BU(n,`package`,`singletonServices`);e&&(r=e)}return t(r,e)}}}l.push({name:t.replaceAll(`@`,`_`).replaceAll(`:`,`__`),description:n?.description||n?.title||t,inputSchema:f,needsApproval:m||void 0,approvalDescriptionFn:h,execute:async n=>new q0e(c,e.sessionService?{...c0e(e.sessionService)}:{},{sessionService:e.sessionService}).rpc(t,n)})}if(h?.length){let r=BU(null,`agent`,`agentsMeta`);for(let i of h){let o=r[i];if(!o){c.logger.warn(`Sub-agent '${i}' not found in agent registry`);continue}o.permissions?.length&&(!p||!await t0e(o.permissions,p,c))||l.push({name:i,description:o.description,inputSchema:{type:`object`,properties:{message:{type:`string`},session:{type:`string`,description:`Short session label for thread continuity`}},required:[`message`,`session`]},execute:async r=>{let{message:o,session:c}=r,l=`${i}::${c}`,u=t.get(l);if(u||(u=$U(),t.set(l,u)),a){let l=s!==`supervise`;l&&a.delegateState&&(a.delegateState.delegated=!0);let{channel:d}=a;d.send({type:`agent-call`,agentName:i,session:c,input:o});let f=iW(d,i,c),p=l?f:{...f,send:e=>{e.type===`text-delta`||e.type===`reasoning-delta`||f.send(e)}},m=await F0e(i,{message:o,threadId:u,resourceId:n},p,e,t,a.options);return f.approvals.length>0?{__approvalRequired:!0,toolName:i,args:r,agentRunId:f.approvals[0].runId,subApprovals:f.approvals}:(d.send({type:`agent-result`,agentName:i,session:c,result:m}),m)}let d=await U0e(i,{message:o,threadId:u,resourceId:n},e,t);return d.status===`suspended`&&d.pendingApprovals?.length?{__approvalRequired:!0,toolName:i,args:r,agentRunId:d.runId,subApprovals:d.pendingApprovals.map(e=>({toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,runId:e.runId}))}:d.object??d.text}})}}if(o?.some(e=>e.beforeToolCall||e.afterToolCall))for(let e of l){let t=e.execute;e.execute=async n=>{let r=$U(),i=n??{};for(let t of o)if(t.beforeToolCall){let n=await t.beforeToolCall(c,{toolName:e.name,toolCallId:r,args:i});n&&`args`in n&&(i=n.args)}let a=Date.now(),s,l;try{s=await t(i)}catch(e){if(l=e,e?.payload?.error===`missing_credential`)throw e;s=e instanceof Error?e.message:String(e)}let u=Date.now()-a;for(let t=o.length-1;t>=0;t--){let n=o[t];if(n.afterToolCall){let t=await n.afterToolCall(c,{toolName:e.name,toolCallId:r,args:i,result:s,durationMs:u});t&&`result`in t&&(s=t.result)}}if(l)throw l;return s}}return{tools:l,missingRpcs:u}}async function B0e(e,t,n,r,i){let a=HU(),{agent:o,packageName:s,resolvedName:c}=nW(e),l=a.aiAgentRunner;if(!l)throw new z1e;if(n.getCredential&&l.withApiKey){let e=await n.getCredential(`AI_API_KEY`);e?.apiKey?.trim()&&(l=l.withApiKey(e.apiKey))}let{storage:u}=p0e(o,a),d=o.memory,f=t.threadId,p=BU(s,`agent`,`agentsMeta`)[c],m=p?.outputSchema,h=m?BU(s,`misc`,`schemas`).get(m):void 0,g=p?.workingMemorySchema??null,_=g?BU(s,`misc`,`schemas`).get(g):void 0;if(u)try{await u.getThread(f)}catch{await u.createThread(t.resourceId,{threadId:f})}let v=[];u&&(v=await u.getMessages(f,{lastN:d?.lastMessages??20}));let y=await h0e(d,u,t,_),b=t.attachments?.length?[{type:`text`,text:t.message},...t.attachments.map(e=>({type:e.type,data:e.data,url:e.url,mediaType:e.mediaType,...e.filename?{filename:e.filename}:{}}))]:t.message,x={id:$U(),role:`user`,content:b,createdAt:new Date},S=_0e([...y,...v,x]),C=o.aiMiddleware??[],{tools:w,missingRpcs:T}=await z0e(n,r,t.resourceId,c,s,i,C,o.agentMode),E=await rW(c,s);t.context&&(E=`${E}\n\nCurrent context (use these identifiers directly in tool calls — do not ask the user for them):\n${t.context}`);let D=D0e(c,o);t.model&&(D.model=D0e(c,{...o,model:t.model}).model),t.temperature!==void 0&&(D.temperature=t.temperature);let O=D.maxSteps??10,k={model:D.model,temperature:D.temperature,instructions:E,messages:S,tools:w,maxSteps:1,toolChoice:o.toolChoice??`auto`,outputSchema:h};return{agent:o,packageName:s,resolvedName:c,agentRunner:l,storage:u,memoryConfig:d,threadId:f,userMessage:x,runnerParams:k,maxSteps:O,missingRpcs:T,workingMemoryJsonSchema:_,workingMemorySchemaName:g}}function V0e(e){if(e===null)return;if(Array.isArray(e))return e.map(V0e);if(typeof e!=`object`)return e;let t={};for(let[n,r]of Object.entries(e))r!==null&&(t[n]=V0e(r));return t}function H0e(e){if(!e||typeof e!=`object`)return{text:null,uiSpec:null};let t=e;return{text:typeof t.text==`string`?t.text:null,uiSpec:t.ui??null}}async function U0e(e,t,n,r){let{agent:i,agentRunner:a,storage:o,memoryConfig:s,threadId:c,userMessage:l,runnerParams:u,maxSteps:d,missingRpcs:f,workingMemorySchemaName:p}=await B0e(e,t,n,r??new Map);u.agentId=e;let m=HU(),{aiRunState:h}=m;if(!h)throw Error(`AIRunStateService not available in singletonServices`);if(f.length>0)return{runId:await h.createRun({agentName:e,threadId:c,resourceId:t.resourceId,status:`suspended`,suspendReason:`rpc-missing`,missingRpcs:f,usage:{inputTokens:0,outputTokens:0,model:i.model},createdAt:new Date,updatedAt:new Date}),text:``,threadId:c,steps:[],usage:{inputTokens:0,outputTokens:0}};let g=[...E0e(s,o,{threadId:c,workingMemorySchemaName:p,logger:m.logger,schemaService:m.schema}),...i.aiMiddleware??[]],_=u.messages,v=u.instructions;for(let e of g)if(e.modifyInput){let t=await e.modifyInput(m,{messages:_,instructions:v});_=t.messages,v=t.instructions}u.messages=_,u.instructions=v;let y=await h.createRun({agentName:e,threadId:c,resourceId:t.resourceId,status:`running`,usage:{inputTokens:0,outputTokens:0,model:i.model},createdAt:new Date,updatedAt:new Date});try{let e=[],n={inputTokens:0,outputTokens:0},r=null;for(let f=0;f<d;f++){if(i.prepareStep){let e=!1;if(await i.prepareStep({stepNumber:f,messages:u.messages,tools:u.tools,toolChoice:u.toolChoice,model:u.model,stop:()=>{e=!0}}),e)break}let d=await a.run(u);r=d,n.inputTokens+=d.usage.inputTokens,n.outputTokens+=d.usage.outputTokens;for(let e of g)e.afterStep&&await e.afterStep(m,{stepNumber:f,text:d.text,toolCalls:d.toolCalls,toolResults:d.toolResults,usage:d.usage,finishReason:d.finishReason});if(e.push({usage:d.usage,toolCalls:d.toolCalls.map(e=>{let t=d.toolResults.find(t=>t.toolCallId===e.toolCallId);return{name:e.toolName,args:e.args,result:typeof t?.result==`string`?t.result:JSON.stringify(t?.result??``)}})}),d.toolCalls.length===0)break;let p=j0e(d,u.tools,y);if(p.length>0){for(let e of p){let t=u.tools.find(t=>t.name===e.toolName);if(t?.approvalDescriptionFn&&!e.reason)try{e.reason=await t.approvalDescriptionFn(e.args)}catch{}}let a=p.map(e=>e.agentRunId?{type:`agent-call`,toolCallId:e.toolCallId,agentName:e.toolName,agentRunId:e.agentRunId,displayToolName:e.displayToolName??e.toolName,displayArgs:e.displayArgs??e.args}:{type:`tool-call`,toolCallId:e.toolCallId,toolName:e.toolName,args:e.args}),f=e.slice(0,-1);return await g0e(o,c,t.resourceId,s,l,{text:``,steps:f}),o&&await o.saveMessages(c,[{id:$U(),role:`assistant`,toolCalls:d.toolCalls.map(e=>({id:e.toolCallId,name:e.toolName,args:e.args})),createdAt:new Date}]),await h.updateRun(y,{status:`suspended`,suspendReason:`approval`,pendingApprovals:a,usage:{...n,model:i.model}}),{runId:y,text:r?.text??``,threadId:c,steps:e,usage:n,status:`suspended`,pendingApprovals:p.map(e=>({toolCallId:e.toolCallId,toolName:e.displayToolName??e.toolName,args:e.displayArgs??e.args,reason:e.reason,runId:y}))}}eW(u,d)}let f=r?.object,p=H0e(f),_=p.text??r?.text??``,v={text:_,steps:e},b=_,x=u.messages;for(let e=g.length-1;e>=0;e--){let t=g[e];if(t.modifyOutput){let e=await t.modifyOutput(m,{text:b,messages:x,usage:n});b=e.text,x=e.messages}}return await g0e(o,c,t.resourceId,s,l,{...v,text:b,uiSpec:p.uiSpec}),await h.updateRun(y,{status:`completed`,usage:{...n,model:i.model}}),{runId:y,text:b,object:f,threadId:c,steps:e,usage:n}}catch(e){for(let t of g)if(t.onError)try{await t.onError(m,{error:e instanceof Error?e:Error(String(e)),stepNumber:-1,messages:u.messages})}catch{}throw await h.updateRun(y,{status:`failed`,errorMessage:e instanceof Error?e.message:String(e)}),e}}async function aW(e,t,n,r){let i=HU(),{aiRunState:a}=i;if(!a)throw Error(`AIRunStateService not available in singletonServices`);let o=await a.getRun(e);if(!o)throw Error(`No run found for runId ${e}`);if(r&&o.agentName!==r)throw Error(`Run ${e} belongs to agent '${o.agentName}', not '${r}'`);if(o.status!==`suspended`)throw Error(`Run ${e} is not suspended (status: ${o.status})`);let{agent:s,packageName:c,resolvedName:l}=nW(o.agentName),{storage:u}=p0e(s,i),d=s.memory,f=i.aiAgentRunner;if(!f)throw new z1e;let p=new Set(t.filter(e=>e.approved).map(e=>e.toolCallId)),m=new Set(t.filter(e=>!e.approved).map(e=>e.toolCallId)),h=[...o.pendingApprovals??[]];for(let{toolCallId:e,approved:n}of t)await a.resolveApproval(e,n?`approved`:`denied`);let{tools:g}=await z0e(n,new Map,o.resourceId,l,c,void 0,s.aiMiddleware??[]),_=[];for(let e of h){if(e.type!==`tool-call`)continue;let t=e.toolCallId,n;if(m.has(t))n=`The user explicitly declined this action. Inform them that it was declined and do not retry.`;else if(p.has(t)){let t=g.find(t=>t.name===e.toolName);if(!t)throw Error(`Tool "${e.toolName}" not found in agent definition`);let r=V0e(typeof e.args==`string`?JSON.parse(e.args):e.args)??{};try{let e=await t.execute(r);n=typeof e==`string`?e:JSON.stringify(e)}catch(e){n=e?.payload?.error===`missing_credential`?JSON.stringify(e.payload):`Error: ${e instanceof Error?e.message:String(e)}`}}else continue;_.push({toolCallId:t,toolName:e.toolName,args:typeof e.args==`string`?JSON.parse(e.args):e.args,result:n})}return u&&_.length>0&&await u.saveMessages(o.threadId,[{id:$U(),role:`tool`,toolResults:_.map(e=>({id:e.toolCallId,name:e.toolName,result:e.result})),createdAt:new Date}]),await a.updateRun(e,{status:`running`}),W0e(o,s,c,l,u,d,f,n,a)}async function W0e(e,t,n,r,i,a,o,s,c){let l=HU(),u=BU(n,`agent`,`agentsMeta`)[r],d=u?.workingMemorySchema??null,f=i?await i.getMessages(e.threadId,{lastN:a?.lastMessages??20}):[],p=d?BU(n,`misc`,`schemas`).get(d):void 0,m=_0e([...await h0e(a,i,{message:``,threadId:e.threadId,resourceId:e.resourceId},p),...f]),h=await rW(r,n),g=[...E0e(a,i,{threadId:e.threadId,workingMemorySchemaName:d,logger:l.logger,schemaService:l.schema}),...t.aiMiddleware??[]],_=m,v=h;for(let e of g)if(e.modifyInput){let t=await e.modifyInput(l,{messages:_,instructions:v});_=t.messages,v=t.instructions}let{tools:y}=await z0e(s,new Map,e.resourceId,r,n,void 0,g),b=D0e(r,t),x=b.maxSteps??10,S={model:b.model,temperature:b.temperature,instructions:v,messages:_,tools:y,maxSteps:1,toolChoice:t.toolChoice??`auto`,outputSchema:u?.outputSchema?BU(n,`misc`,`schemas`).get(u.outputSchema):void 0,agentId:e.agentName};try{let n=[],r={inputTokens:0,outputTokens:0},s=null;for(let u=0;u<x;u++){let d=await o.run(S);s=d,r.inputTokens+=d.usage.inputTokens,r.outputTokens+=d.usage.outputTokens;for(let e of g)e.afterStep&&await e.afterStep(l,{stepNumber:u,text:d.text,toolCalls:d.toolCalls,toolResults:d.toolResults,usage:d.usage,finishReason:d.finishReason});if(n.push({usage:d.usage,toolCalls:d.toolCalls.map(e=>{let t=d.toolResults.find(t=>t.toolCallId===e.toolCallId);return{name:e.toolName,args:e.args,result:typeof t?.result==`string`?t.result:JSON.stringify(t?.result??``)}})}),d.toolCalls.length===0)break;let f=j0e(d,S.tools,e.runId);if(f.length>0){for(let e of f){let t=S.tools.find(t=>t.name===e.toolName);if(t?.approvalDescriptionFn&&!e.reason)try{e.reason=await t.approvalDescriptionFn(e.args)}catch{}}let o=f.map(e=>e.agentRunId?{type:`agent-call`,toolCallId:e.toolCallId,agentName:e.toolName,agentRunId:e.agentRunId,displayToolName:e.displayToolName??e.toolName,displayArgs:e.displayArgs??e.args}:{type:`tool-call`,toolCallId:e.toolCallId,toolName:e.toolName,args:e.args}),l=n.slice(0,-1);l.length>0&&await g0e(i,e.threadId,e.resourceId,a,null,{text:``,steps:l}),i&&await i.saveMessages(e.threadId,[{id:$U(),role:`assistant`,toolCalls:d.toolCalls.map(e=>({id:e.toolCallId,name:e.toolName,args:e.args})),createdAt:new Date}]),await c.updateRun(e.runId,{status:`suspended`,suspendReason:`approval`,pendingApprovals:o,usage:{...r,model:t.model}});let u=s?.text??``;return{runId:e.runId,text:u,threadId:e.threadId,steps:n,usage:r,status:`suspended`,pendingApprovals:f.map(t=>({toolCallId:t.toolCallId,toolName:t.displayToolName??t.toolName,args:t.displayArgs??t.args,reason:t.reason,runId:e.runId}))}}eW(S,d)}let u=s?.text??``,d=s?.object,f={text:u,steps:n},p=u,m=S.messages;for(let e=g.length-1;e>=0;e--){let t=g[e];if(t.modifyOutput){let e=await t.modifyOutput(l,{text:p,messages:m,usage:r});p=e.text,m=e.messages}}return await g0e(i,e.threadId,e.resourceId,a,null,{...f,text:p}),await c.updateRun(e.runId,{status:`completed`,usage:{...r,model:t.model}}),{runId:e.runId,text:p,object:d,threadId:e.threadId,steps:n,usage:r}}catch(t){for(let e of g)if(e.onError)try{await e.onError(l,{error:t instanceof Error?t:Error(String(t)),stepNumber:-1,messages:S.messages})}catch{}throw await c.updateRun(e.runId,{status:`failed`,errorMessage:t instanceof Error?t.message:String(t)}),t}}var oW=class extends UU{rpcName;constructor(e){super(`RPC function not found: ${e}`),this.rpcName=e}};WU(oW,{status:404,mcpCode:-32601,message:`RPC function not found.`});const G0e=e=>{let t=e.indexOf(`:`);if(t===-1)return null;let n=e.substring(0,t),r=e.substring(t+1),i=BU(null,`addons`,`packages`).get(n);return i?{package:i.package,function:r,addonConfig:i}:null};var K0e=(e,t=null)=>{if(t){let n=BU(t,`function`,`meta`)?.[e];if(n)return{pikkuFuncId:n.pikkuFuncId||e,packageName:t}}let n=BU(null,`rpc`,`meta`),r=n[e];if(!r){let{baseName:t,version:i}=o0e(e);i!==null&&(r=n[t])}if(!r){let t=BU(null,`function`,`meta`)?.[e];if(t)return{pikkuFuncId:t.pikkuFuncId||e,packageName:null}}if(!r)throw new oW(e);return{pikkuFuncId:r,packageName:null}},q0e=class{services;wire;options;packageName;constructor(e,t,n,r=null){this.services=e,this.wire=t,this.options=n,this.packageName=r}async rpcExposed(e,t){let n;if(e.includes(`:`)){let t=G0e(e);t&&(n=BU(t.package,`function`,`meta`)[t.function])}else{let t=K0e(e,this.packageName);n=BU(t.packageName,`function`,`meta`)[t.pikkuFuncId]}if(!n||!n.expose)throw new oW(e);return await this.rpc(e,t)}async rpc(e,t){let n=this.wire.rpc?.depth||0,r={...this.wire,rpc:this.wire.rpc?{...this.wire.rpc,depth:n+1,global:!1}:void 0};if(e.includes(`:`))try{return await this.invokeAddonFunction(e,t,r)}catch(e){if(!(e instanceof oW))throw e}try{let n=K0e(e,this.packageName);return await $0e(`rpc`,e,n.pikkuFuncId,{auth:this.options.requiresAuth,singletonServices:this.services,data:()=>t,wire:r,packageName:n.packageName})}catch(n){if(n instanceof oW&&this.services.deploymentService){let n=this.wire.getSession&&typeof this.wire.getSession==`function`?await this.wire.getSession():this.wire.session;return this.services.deploymentService.invoke(e,t,n,this.wire.traceId)}throw n}}async invokeAddonFunction(e,t,n){let r=G0e(e);if(!r)throw new oW(e);let i=BU(r.package,`function`,`meta`)[r.function];if(!i)throw new oW(e);let a=i.pikkuFuncId||r.function,o=r.addonConfig?.auth??this.options.requiresAuth,s=[...r.addonConfig?.tags??[],...i.tags??[]];return $0e(`rpc`,e,a,{auth:o,singletonServices:this.services,data:()=>t,wire:n,packageName:r.package,tags:s})}async rpcWithWire(e,t,n){let r=this.wire.rpc?.depth||0,i={...this.wire,...n,rpc:this.wire.rpc?{...this.wire.rpc,depth:r+1,global:!1}:void 0};if(e.includes(`:`))return this.invokeAddonFunction(e,t,i);try{let n=K0e(e,this.packageName);return await $0e(`rpc`,e,n.pikkuFuncId,{auth:this.options.requiresAuth,singletonServices:this.services,data:()=>t,wire:i,packageName:n.packageName})}catch(n){if(n instanceof oW&&this.services.deploymentService){let n=this.wire.getSession&&typeof this.wire.getSession==`function`?await this.wire.getSession():this.wire.session;return this.services.deploymentService.invoke(e,t,n,this.wire.traceId)}throw n}}async startWorkflow(e,t,n){if(!this.services.workflowService)throw Error(`WorkflowService service not available`);let r=this.wire.workflowStep?.runId??this.wire.graph?.runId,i=n?.wire??{type:this.wire.wireType??`unknown`,id:this.wire.wireId,...r?{parentRunId:r}:{},...this.wire.pikkuUserId?{pikkuUserId:this.wire.pikkuUserId}:{}};return this.services.workflowService.startWorkflow(e,t,i,this,n)}get agent(){return{run:async(e,t)=>{let n=await U0e(e,t,{sessionService:this.options.sessionService,getCredential:this.wire.getCredential?.bind(this.wire)});return{runId:n.runId,result:n.object??n.text,usage:n.usage,...n.status===`suspended`&&{status:`suspended`,pendingApprovals:n.pendingApprovals}}},stream:async(e,t,n)=>{let r=this.wire.channel;if(!r)throw Error(`No channel available for streaming`);await F0e(e,t,r,{sessionService:this.options.sessionService,getCredential:this.wire.getCredential?.bind(this.wire)},void 0,n)},resume:async(e,t,n)=>{let r=this.wire.channel;if(!r)throw Error(`No channel available for streaming`);await I0e({runId:e,...t},r,{sessionService:this.options.sessionService,getCredential:this.wire.getCredential?.bind(this.wire)},n)},approve:async(e,t,n)=>{let r=await aW(e,t,{sessionService:this.options.sessionService},n);return{runId:r.runId,result:r.object??r.text,usage:r.usage,...r.status===`suspended`&&{status:`suspended`,pendingApprovals:r.pendingApprovals}}}}}async remote(e,t){if(!this.services.deploymentService)throw Error(`No DeploymentService configured for remote RPC: ${e}. Set up a DeploymentService to enable remote function calls.`);let n=this.wire.getSession&&typeof this.wire.getSession==`function`?await this.wire.getSession():this.wire.session;return this.services.deploymentService.invoke(e,t,n,this.wire.traceId)}};const J0e=new class{getContextRPCService(e,t,n,r=0,i=null){let a=new q0e(e,t,typeof n==`object`&&n?n:{requiresAuth:n},i);return{depth:r,global:!1,invoke:a.rpc.bind(a),remote:a.remote.bind(a),exposed:a.rpcExposed.bind(a),startWorkflow:a.startWorkflow.bind(a),get agent(){return a.agent},rpcWithWire:a.rpcWithWire.bind(a)}}};async function Y0e(e,t,n){let r=l0e(e);r&&(e.pikkuUserId=r,n instanceof s0e&&n.setPikkuUserId(r));let{sessionStore:i}=t;if(!(!i||!r)&&!e.session){let t=await i.get(r);t&&(e.session=t,n?.setInitial(t))}}var X0e=e=>{let t=BU(null,`addons`,`packages`);if(!t)return null;for(let[n,r]of t.entries())if(r?.package===e)return n;return null},Z0e=(e,t)=>new Proxy(e,{get(e,n,r){if(n===`startWorkflow`||n===`runToCompletion`){let i=Reflect.get(e,n,r);return function(e,...n){if(typeof e==`string`&&!e.includes(`:`)){let n=X0e(t);n&&(e=`${n}:${e}`)}return i.call(this,e,...n)}}return Reflect.get(e,n,r)}}),Q0e=async(e,t)=>{let n=BU(e,`package`,`singletonServices`);if(n)return n;let r=BU(e,`package`,`factories`);if(!r||!r.createSingletonServices)return t;let i=t.config;r.createConfig&&(i=await r.createConfig(t.variables));let a=await r.createSingletonServices(i,t);return a.workflowService&&typeof a.workflowService==`object`&&(a.workflowService=Z0e(a.workflowService,e)),BU(e,`package`,`singletonServices`,a),a};const $0e=async(e,t,n,{singletonServices:r,createWireServices:i,data:a,auth:o,inheritedMiddleware:s,wireMiddleware:c,inheritedChannelMiddleware:l,wireChannelMiddleware:u,inheritedPermissions:d,wirePermissions:f,coerceDataFromSchema:p,tags:m=[],wire:h,sessionService:g,credentialWireService:_,packageName:v=null})=>{h.wireType??=e,h.wireId??=t;let y=BU(v,`function`,`functions`),b=y.get(n),x=BU(v,`function`,`meta`),S=x[n];if(!b||!S){let{baseName:e,version:t}=o0e(n);t!==null&&(b||=y.get(e),S||=x[e],b&&S&&r.logger.warn(`Version '${n}' not registered, resolved to '${e}'`))}if(!b)throw Error(`Function not found: ${n}`);if(!S)throw Error(`Function meta not found: ${n}`);let C=S.pikkuFuncId??n,w=v?await Q0e(v,r):r,T=i;if(v){let e=BU(v,`package`,`factories`);e?.createWireServices&&(T=e.createWireServices)}let E=Y1e(e,t,{wireInheritedChannelMiddleware:l,wireChannelMiddleware:u,packageName:v}),D=E.length>0&&h.channel?X1e(h,w,E):h;if(!D.getCredentials){let e=_??new u0e(w.credentialService,D);Object.assign(D,d0e(e))}let O=f0e(b.audit),k=D,ee=k.functionId,te=k.audit,ne=Object.getOwnPropertyDescriptor(k,`rpc`);k.functionId=C,k.audit=O;let re;re=m&&m.length>0?[...d||[],...m.map(e=>({type:`tag`,tag:e}))]:d||[];let ie=async()=>{await Y0e(k,w,g),g&&(k.session=g.freezeInitial(),k.setSession=e=>g.set(e),k.clearSession=()=>g.clear(),k.getSession=()=>g.get(),k.hasSessionChanged=()=>g.sessionChanged);let r=k.session;if(S.sessionless){if((o===!0||b.auth===!0)&&!r)throw new GU(`Authentication required`)}else if((o===!1||b.auth===!1)&&w.logger.warn(`Function '${n}' requires a session but auth was explicitly disabled — use pikkuSessionlessFunc instead.`),!r)throw new GU(`Authentication required`);if(r?.readonly&&!S.readonly)throw new I1e;let i=await a(),s=S.inputSchemaName;s&&(p&&r0e(s,i,v),await i0e(w.logger,w.schema,s,i,v)),(re.length>0||f||S.permissions||b.permissions)&&await e0e(e,t,{wireInheritedPermissions:re,wirePermissions:f,funcInheritedPermissions:S.permissions,funcPermissions:b.permissions,services:w,wire:k,data:i,packageName:v});let c;try{c=await T?.(w,k);let e=c&&Object.keys(c).length>0?{...w,...c}:w,t=v;return Object.defineProperty(k,`rpc`,{get(){let n=J0e.getContextRPCService(e,k,{sessionService:g},0,t);return Object.defineProperty(k,`rpc`,{value:n,writable:!0,configurable:!0}),n},configurable:!0,enumerable:!0}),await b.func(e,i,k)}finally{c&&Object.keys(c).length>0&&await B1e(w.logger,c)}},ae=q1e(e,t,{wireInheritedMiddleware:s,wireMiddleware:c,funcInheritedMiddleware:S.middleware,funcMiddleware:b.middleware,packageName:v});if(ae.length>0)try{return await U1e(w,k,ae,ie)}finally{ne&&Object.defineProperty(k,`rpc`,ne),ee===void 0?delete k.functionId:k.functionId=ee,te===void 0?delete k.audit:k.audit=te}try{return await ie()}finally{ne&&Object.defineProperty(k,`rpc`,ne),ee===void 0?delete k.functionId:k.functionId=ee,te===void 0?delete k.audit:k.audit=te}};function e2e(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function t2e(e,t){if(t.length===0)return null;let n=e.commands[t[0]];if(!n)return null;for(let e=1;e<t.length;e++){if(!n.subcommands||!n.subcommands[t[e]])return null;n=n.subcommands[t[e]]}return n}function n2e(e,t){let n={...e.options};if(t.length===0)return n;let r=e.commands[t[0]];if(r){n={...n,...r.options};for(let e=1;e<t.length;e++)r.subcommands&&r.subcommands[t[e]]&&(r=r.subcommands[t[e]],n={...n,...r.options})}return n}function r2e(e,t,n=[]){let r=[],i=t.programs[e];if(!i)return`Program not found: ${e}`;if(n.length===0){r.push(`Usage: ${e} <command> [options]`),r.push(``),r.push(`Commands:`);for(let[e,t]of Object.entries(i.commands)){let n=t.description||``,i=t.isDefault?` (default)`:``;r.push(` ${e.padEnd(20)} ${n}${i}`)}Object.keys(i.options).length>0&&(r.push(``),r.push(`Options:`),i2e(i.options,r))}else{let t=t2e(i,n);if(!t)return`Unknown command: ${n.join(` `)}`;let a=`${e} ${n.join(` `)}`;if(t.parameters&&(a+=` `+t.parameters),r.push(`Usage: ${a} [options]`),t.description&&(r.push(``),r.push(t.description)),t.positionals.length>0){r.push(``),r.push(`Arguments:`);for(let e of t.positionals){let t=e.required?`<required>`:`[optional]`,n=e.variadic?`...`:``;r.push(` ${e.name}${n} ${t}`)}}if(t.subcommands&&Object.keys(t.subcommands).length>0){r.push(``),r.push(`Subcommands:`);for(let[e,n]of Object.entries(t.subcommands)){let t=n.description||``;r.push(` ${e.padEnd(20)} ${t}`)}}let o=n2e(i,n);Object.keys(o).length>0&&(r.push(``),r.push(`Options:`),i2e(o,r))}return r.join(`
|
|
185
|
+
When calling a sub-agent, provide a short session name that describes the task. Use the same session name to continue a previous conversation with that agent. Use a new session name for a new independent task. When a request involves multiple actions for the same domain, combine them into a single sub-agent call rather than making separate calls.`),i}function iW(e,t,n){let r=[];return{channelId:`${e.channelId}:${t}:${n}`,openingData:e.openingData,get state(){return e.state},get approvals(){return r},close:()=>{},sendBinary:t=>e.sendBinary(t),send:i=>{if(i.type!==`done`){if(i.type===`approval-request`){r.push({toolCallId:i.toolCallId,toolName:i.toolName,args:i.args,runId:i.runId});return}i.type===`step-start`||i.type===`text-delta`||i.type===`reasoning-delta`||i.type===`tool-call`||i.type===`tool-result`||i.type===`usage`||i.type===`error`||i.type===`workflow-created`?e.send({...i,agent:t,session:n}):e.send(i)}},setState:t=>e.setState(t),getState:()=>e.getState(),clearState:()=>e.clearState()}}async function z0e(e,t,n,r,i,a,o,s){let c=HU(),l=[],u=[],d=a?.options?.requiresToolApproval??`explicit`,f=BU(i,`agent`,`agentsMeta`)[r];if(!f)return{tools:l,missingRpcs:u};let p=e.sessionService?await e.sessionService.get():null,m=f.tools,h=f.agents;if(m?.length)for(let t of m){let n,r=null,i,a=t.includes(`:`)?G0e(t):null,o;if(a)r=a.package,o=a.function,n=BU(r,`function`,`meta`)[o],i=BU(r,`misc`,`schemas`);else{if(o=BU(null,`rpc`,`meta`)[t],!o){u.push(t);continue}n=BU(null,`function`,`meta`)[o],i=BU(null,`misc`,`schemas`)}if(!n){u.push(t);continue}if(n.permissions?.length&&(!p||!await t0e(n.permissions,p,c,r)))continue;let s=n?.inputSchemaName,f=s?i.get(s):void 0;(!f||typeof f==`object`&&f.type===`object`&&!f.properties)&&(f={type:`object`,properties:{}});let m=d===`all`||d===`explicit`&&n?.approvalRequired,h;if(m&&o){let e=BU(r,`function`,`functions`).get(o);if(e?.approvalDescription){let t=e.approvalDescription,n=r;h=async e=>{let r=c;if(n){let e=BU(n,`package`,`singletonServices`);e&&(r=e)}return t(r,e)}}}l.push({name:t.replaceAll(`@`,`_`).replaceAll(`:`,`__`),description:n?.description||n?.title||t,inputSchema:f,needsApproval:m||void 0,approvalDescriptionFn:h,execute:async n=>new q0e(c,e.sessionService?{...c0e(e.sessionService)}:{},{sessionService:e.sessionService}).rpc(t,n)})}if(h?.length){let r=BU(null,`agent`,`agentsMeta`);for(let i of h){let o=r[i];if(!o){c.logger.warn(`Sub-agent '${i}' not found in agent registry`);continue}o.permissions?.length&&(!p||!await t0e(o.permissions,p,c))||l.push({name:i,description:o.description,inputSchema:{type:`object`,properties:{message:{type:`string`},session:{type:`string`,description:`Short session label for thread continuity`}},required:[`message`,`session`]},execute:async r=>{let{message:o,session:c}=r,l=`${i}::${c}`,u=t.get(l);if(u||(u=$U(),t.set(l,u)),a){let l=s!==`supervise`;l&&a.delegateState&&(a.delegateState.delegated=!0);let{channel:d}=a;d.send({type:`agent-call`,agentName:i,session:c,input:o});let f=iW(d,i,c),p=l?f:{...f,send:e=>{e.type===`text-delta`||e.type===`reasoning-delta`||f.send(e)}},m=await F0e(i,{message:o,threadId:u,resourceId:n},p,e,t,a.options);return f.approvals.length>0?{__approvalRequired:!0,toolName:i,args:r,agentRunId:f.approvals[0].runId,subApprovals:f.approvals}:(d.send({type:`agent-result`,agentName:i,session:c,result:m}),m)}let d=await U0e(i,{message:o,threadId:u,resourceId:n},e,t);return d.status===`suspended`&&d.pendingApprovals?.length?{__approvalRequired:!0,toolName:i,args:r,agentRunId:d.runId,subApprovals:d.pendingApprovals.map(e=>({toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,runId:e.runId}))}:d.object??d.text}})}}if(o?.some(e=>e.beforeToolCall||e.afterToolCall))for(let e of l){let t=e.execute;e.execute=async n=>{let r=$U(),i=n??{};for(let t of o)if(t.beforeToolCall){let n=await t.beforeToolCall(c,{toolName:e.name,toolCallId:r,args:i});n&&`args`in n&&(i=n.args)}let a=Date.now(),s,l;try{s=await t(i)}catch(e){if(l=e,e?.payload?.error===`missing_credential`)throw e;s=e instanceof Error?e.message:String(e)}let u=Date.now()-a;for(let t=o.length-1;t>=0;t--){let n=o[t];if(n.afterToolCall){let t=await n.afterToolCall(c,{toolName:e.name,toolCallId:r,args:i,result:s,durationMs:u});t&&`result`in t&&(s=t.result)}}if(l)throw l;return s}}return{tools:l,missingRpcs:u}}async function B0e(e,t,n,r,i){let a=HU(),{agent:o,packageName:s,resolvedName:c}=nW(e),l=a.aiAgentRunner;if(!l)throw new z1e;if(n.getCredential&&l.withApiKey){let e=await n.getCredential(`AI_API_KEY`);e?.apiKey?.trim()&&(l=l.withApiKey(e.apiKey))}let{storage:u}=p0e(o,a),d=o.memory,f=t.threadId,p=BU(s,`agent`,`agentsMeta`)[c],m=p?.outputSchema,h=m?BU(s,`misc`,`schemas`).get(m):void 0,g=p?.workingMemorySchema??null,_=g?BU(s,`misc`,`schemas`).get(g):void 0;if(u)try{await u.getThread(f)}catch{await u.createThread(t.resourceId,{threadId:f})}let v=[];u&&(v=await u.getMessages(f,{lastN:d?.lastMessages??20}));let y=await h0e(d,u,t,_),b=t.attachments?.length?[{type:`text`,text:t.message},...t.attachments.map(e=>({type:e.type,data:e.data,url:e.url,mediaType:e.mediaType,...e.filename?{filename:e.filename}:{}}))]:t.message,x={id:$U(),role:`user`,content:b,createdAt:new Date},S=_0e([...y,...v,x]),C=o.aiMiddleware??[],{tools:w,missingRpcs:T}=await z0e(n,r,t.resourceId,c,s,i,C,o.agentMode),E=await rW(c,s);t.context&&(E=`${E}\n\nCurrent context (use these identifiers directly in tool calls — do not ask the user for them):\n${t.context}`);let D=D0e(c,o);t.model&&(D.model=D0e(c,{...o,model:t.model}).model),t.temperature!==void 0&&(D.temperature=t.temperature);let O=D.maxSteps??10,k={model:D.model,temperature:D.temperature,instructions:E,messages:S,tools:w,maxSteps:1,toolChoice:o.toolChoice??`auto`,outputSchema:h};return{agent:o,packageName:s,resolvedName:c,agentRunner:l,storage:u,memoryConfig:d,threadId:f,userMessage:x,runnerParams:k,maxSteps:O,missingRpcs:T,workingMemoryJsonSchema:_,workingMemorySchemaName:g}}function V0e(e){if(e===null)return;if(Array.isArray(e))return e.map(V0e);if(typeof e!=`object`)return e;let t={};for(let[n,r]of Object.entries(e))r!==null&&(t[n]=V0e(r));return t}function H0e(e){if(!e||typeof e!=`object`)return{text:null,uiSpec:null};let t=e;return{text:typeof t.text==`string`?t.text:null,uiSpec:t.ui??null}}async function U0e(e,t,n,r){let{agent:i,agentRunner:a,storage:o,memoryConfig:s,threadId:c,userMessage:l,runnerParams:u,maxSteps:d,missingRpcs:f,workingMemorySchemaName:p}=await B0e(e,t,n,r??new Map);u.agentId=e;let m=HU(),{aiRunState:h}=m;if(!h)throw Error(`AIRunStateService not available in singletonServices`);if(f.length>0)return{runId:await h.createRun({agentName:e,threadId:c,resourceId:t.resourceId,status:`suspended`,suspendReason:`rpc-missing`,missingRpcs:f,usage:{inputTokens:0,outputTokens:0,model:i.model},createdAt:new Date,updatedAt:new Date}),text:``,threadId:c,steps:[],usage:{inputTokens:0,outputTokens:0}};let g=[...E0e(s,o,{threadId:c,workingMemorySchemaName:p,logger:m.logger,schemaService:m.schema}),...i.aiMiddleware??[]],_=u.messages,v=u.instructions;for(let e of g)if(e.modifyInput){let t=await e.modifyInput(m,{messages:_,instructions:v});_=t.messages,v=t.instructions}u.messages=_,u.instructions=v;let y=await h.createRun({agentName:e,threadId:c,resourceId:t.resourceId,status:`running`,usage:{inputTokens:0,outputTokens:0,model:i.model},createdAt:new Date,updatedAt:new Date});try{let e=[],n={inputTokens:0,outputTokens:0},r=null;for(let f=0;f<d;f++){if(i.prepareStep){let e=!1;if(await i.prepareStep({stepNumber:f,messages:u.messages,tools:u.tools,toolChoice:u.toolChoice,model:u.model,stop:()=>{e=!0}}),e)break}let d=await a.run(u);r=d,n.inputTokens+=d.usage.inputTokens,n.outputTokens+=d.usage.outputTokens;for(let e of g)e.afterStep&&await e.afterStep(m,{stepNumber:f,text:d.text,toolCalls:d.toolCalls,toolResults:d.toolResults,usage:d.usage,finishReason:d.finishReason});if(e.push({usage:d.usage,toolCalls:d.toolCalls.map(e=>{let t=d.toolResults.find(t=>t.toolCallId===e.toolCallId);return{name:e.toolName,args:e.args,result:typeof t?.result==`string`?t.result:JSON.stringify(t?.result??``)}})}),d.toolCalls.length===0)break;let p=j0e(d,u.tools,y);if(p.length>0){for(let e of p){let t=u.tools.find(t=>t.name===e.toolName);if(t?.approvalDescriptionFn&&!e.reason)try{e.reason=await t.approvalDescriptionFn(e.args)}catch{}}let a=p.map(e=>e.agentRunId?{type:`agent-call`,toolCallId:e.toolCallId,agentName:e.toolName,agentRunId:e.agentRunId,displayToolName:e.displayToolName??e.toolName,displayArgs:e.displayArgs??e.args}:{type:`tool-call`,toolCallId:e.toolCallId,toolName:e.toolName,args:e.args}),f=e.slice(0,-1);return await g0e(o,c,t.resourceId,s,l,{text:``,steps:f}),o&&await o.saveMessages(c,[{id:$U(),role:`assistant`,toolCalls:d.toolCalls.map(e=>({id:e.toolCallId,name:e.toolName,args:e.args})),createdAt:new Date}]),await h.updateRun(y,{status:`suspended`,suspendReason:`approval`,pendingApprovals:a,usage:{...n,model:i.model}}),{runId:y,text:r?.text??``,threadId:c,steps:e,usage:n,status:`suspended`,pendingApprovals:p.map(e=>({toolCallId:e.toolCallId,toolName:e.displayToolName??e.toolName,args:e.displayArgs??e.args,reason:e.reason,runId:y}))}}eW(u,d)}let f=r?.object,p=H0e(f),_=p.text??r?.text??``,v={text:_,steps:e},b=_,x=u.messages;for(let e=g.length-1;e>=0;e--){let t=g[e];if(t.modifyOutput){let e=await t.modifyOutput(m,{text:b,messages:x,usage:n});b=e.text,x=e.messages}}return await g0e(o,c,t.resourceId,s,l,{...v,text:b,uiSpec:p.uiSpec}),await h.updateRun(y,{status:`completed`,usage:{...n,model:i.model}}),{runId:y,text:b,object:f,threadId:c,steps:e,usage:n}}catch(e){for(let t of g)if(t.onError)try{await t.onError(m,{error:e instanceof Error?e:Error(String(e)),stepNumber:-1,messages:u.messages})}catch{}throw await h.updateRun(y,{status:`failed`,errorMessage:e instanceof Error?e.message:String(e)}),e}}async function aW(e,t,n,r){let i=HU(),{aiRunState:a}=i;if(!a)throw Error(`AIRunStateService not available in singletonServices`);let o=await a.getRun(e);if(!o)throw Error(`No run found for runId ${e}`);if(r&&o.agentName!==r)throw Error(`Run ${e} belongs to agent '${o.agentName}', not '${r}'`);if(o.status!==`suspended`)throw Error(`Run ${e} is not suspended (status: ${o.status})`);let{agent:s,packageName:c,resolvedName:l}=nW(o.agentName),{storage:u}=p0e(s,i),d=s.memory,f=i.aiAgentRunner;if(!f)throw new z1e;let p=new Set(t.filter(e=>e.approved).map(e=>e.toolCallId)),m=new Set(t.filter(e=>!e.approved).map(e=>e.toolCallId)),h=[...o.pendingApprovals??[]];for(let{toolCallId:e,approved:n}of t)await a.resolveApproval(e,n?`approved`:`denied`);let{tools:g}=await z0e(n,new Map,o.resourceId,l,c,void 0,s.aiMiddleware??[]),_=[];for(let e of h){if(e.type!==`tool-call`)continue;let t=e.toolCallId,n;if(m.has(t))n=`The user explicitly declined this action. Inform them that it was declined and do not retry.`;else if(p.has(t)){let t=g.find(t=>t.name===e.toolName);if(!t)throw Error(`Tool "${e.toolName}" not found in agent definition`);let r=V0e(typeof e.args==`string`?JSON.parse(e.args):e.args)??{};try{let e=await t.execute(r);n=typeof e==`string`?e:JSON.stringify(e)}catch(e){n=e?.payload?.error===`missing_credential`?JSON.stringify(e.payload):`Error: ${e instanceof Error?e.message:String(e)}`}}else continue;_.push({toolCallId:t,toolName:e.toolName,args:typeof e.args==`string`?JSON.parse(e.args):e.args,result:n})}return u&&_.length>0&&await u.saveMessages(o.threadId,[{id:$U(),role:`tool`,toolResults:_.map(e=>({id:e.toolCallId,name:e.toolName,result:e.result})),createdAt:new Date}]),await a.updateRun(e,{status:`running`}),W0e(o,s,c,l,u,d,f,n,a)}async function W0e(e,t,n,r,i,a,o,s,c){let l=HU(),u=BU(n,`agent`,`agentsMeta`)[r],d=u?.workingMemorySchema??null,f=i?await i.getMessages(e.threadId,{lastN:a?.lastMessages??20}):[],p=d?BU(n,`misc`,`schemas`).get(d):void 0,m=_0e([...await h0e(a,i,{message:``,threadId:e.threadId,resourceId:e.resourceId},p),...f]),h=await rW(r,n),g=[...E0e(a,i,{threadId:e.threadId,workingMemorySchemaName:d,logger:l.logger,schemaService:l.schema}),...t.aiMiddleware??[]],_=m,v=h;for(let e of g)if(e.modifyInput){let t=await e.modifyInput(l,{messages:_,instructions:v});_=t.messages,v=t.instructions}let{tools:y}=await z0e(s,new Map,e.resourceId,r,n,void 0,g),b=D0e(r,t),x=b.maxSteps??10,S={model:b.model,temperature:b.temperature,instructions:v,messages:_,tools:y,maxSteps:1,toolChoice:t.toolChoice??`auto`,outputSchema:u?.outputSchema?BU(n,`misc`,`schemas`).get(u.outputSchema):void 0,agentId:e.agentName};try{let n=[],r={inputTokens:0,outputTokens:0},s=null;for(let u=0;u<x;u++){let d=await o.run(S);s=d,r.inputTokens+=d.usage.inputTokens,r.outputTokens+=d.usage.outputTokens;for(let e of g)e.afterStep&&await e.afterStep(l,{stepNumber:u,text:d.text,toolCalls:d.toolCalls,toolResults:d.toolResults,usage:d.usage,finishReason:d.finishReason});if(n.push({usage:d.usage,toolCalls:d.toolCalls.map(e=>{let t=d.toolResults.find(t=>t.toolCallId===e.toolCallId);return{name:e.toolName,args:e.args,result:typeof t?.result==`string`?t.result:JSON.stringify(t?.result??``)}})}),d.toolCalls.length===0)break;let f=j0e(d,S.tools,e.runId);if(f.length>0){for(let e of f){let t=S.tools.find(t=>t.name===e.toolName);if(t?.approvalDescriptionFn&&!e.reason)try{e.reason=await t.approvalDescriptionFn(e.args)}catch{}}let o=f.map(e=>e.agentRunId?{type:`agent-call`,toolCallId:e.toolCallId,agentName:e.toolName,agentRunId:e.agentRunId,displayToolName:e.displayToolName??e.toolName,displayArgs:e.displayArgs??e.args}:{type:`tool-call`,toolCallId:e.toolCallId,toolName:e.toolName,args:e.args}),l=n.slice(0,-1);l.length>0&&await g0e(i,e.threadId,e.resourceId,a,null,{text:``,steps:l}),i&&await i.saveMessages(e.threadId,[{id:$U(),role:`assistant`,toolCalls:d.toolCalls.map(e=>({id:e.toolCallId,name:e.toolName,args:e.args})),createdAt:new Date}]),await c.updateRun(e.runId,{status:`suspended`,suspendReason:`approval`,pendingApprovals:o,usage:{...r,model:t.model}});let u=s?.text??``;return{runId:e.runId,text:u,threadId:e.threadId,steps:n,usage:r,status:`suspended`,pendingApprovals:f.map(t=>({toolCallId:t.toolCallId,toolName:t.displayToolName??t.toolName,args:t.displayArgs??t.args,reason:t.reason,runId:e.runId}))}}eW(S,d)}let u=s?.text??``,d=s?.object,f={text:u,steps:n},p=u,m=S.messages;for(let e=g.length-1;e>=0;e--){let t=g[e];if(t.modifyOutput){let e=await t.modifyOutput(l,{text:p,messages:m,usage:r});p=e.text,m=e.messages}}return await g0e(i,e.threadId,e.resourceId,a,null,{...f,text:p}),await c.updateRun(e.runId,{status:`completed`,usage:{...r,model:t.model}}),{runId:e.runId,text:p,object:d,threadId:e.threadId,steps:n,usage:r}}catch(t){for(let e of g)if(e.onError)try{await e.onError(l,{error:t instanceof Error?t:Error(String(t)),stepNumber:-1,messages:S.messages})}catch{}throw await c.updateRun(e.runId,{status:`failed`,errorMessage:t instanceof Error?t.message:String(t)}),t}}var oW=class extends UU{rpcName;constructor(e){super(`RPC function not found: ${e}`),this.rpcName=e}};WU(oW,{status:404,mcpCode:-32601,message:`RPC function not found.`});const G0e=e=>{let t=e.indexOf(`:`);if(t===-1)return null;let n=e.substring(0,t),r=e.substring(t+1),i=BU(null,`addons`,`packages`).get(n);return i?{package:i.package,function:r,addonConfig:i}:null};var K0e=(e,t=null)=>{if(t){let n=BU(t,`function`,`meta`)?.[e];if(n)return{pikkuFuncId:n.pikkuFuncId||e,packageName:t}}let n=BU(null,`rpc`,`meta`),r=n[e];if(!r){let{baseName:t,version:i}=o0e(e);i!==null&&(r=n[t])}if(!r){let t=BU(null,`function`,`meta`)?.[e];if(t)return{pikkuFuncId:t.pikkuFuncId||e,packageName:null}}if(!r)throw new oW(e);return{pikkuFuncId:r,packageName:null}},q0e=class{services;wire;options;packageName;constructor(e,t,n,r=null){this.services=e,this.wire=t,this.options=n,this.packageName=r}async rpcExposed(e,t){let n;if(e.includes(`:`)){let t=G0e(e);t&&(n=BU(t.package,`function`,`meta`)[t.function])}else{let t=K0e(e,this.packageName);n=BU(t.packageName,`function`,`meta`)[t.pikkuFuncId]}if(!n||!n.expose)throw new oW(e);return await this.rpc(e,t)}async rpc(e,t){let n=this.wire.rpc?.depth||0,r={...this.wire,rpc:this.wire.rpc?{...this.wire.rpc,depth:n+1,global:!1}:void 0};if(e.includes(`:`))try{return await this.invokeAddonFunction(e,t,r)}catch(e){if(!(e instanceof oW))throw e}try{let n=K0e(e,this.packageName);return await $0e(`rpc`,e,n.pikkuFuncId,{auth:this.options.requiresAuth,singletonServices:this.services,data:()=>t,wire:r,packageName:n.packageName})}catch(n){if(n instanceof oW&&this.services.deploymentService){let n=this.wire.getSession&&typeof this.wire.getSession==`function`?await this.wire.getSession():this.wire.session;return this.services.deploymentService.invoke(e,t,n,this.wire.traceId)}throw n}}async invokeAddonFunction(e,t,n){let r=G0e(e);if(!r)throw new oW(e);let i=BU(r.package,`function`,`meta`)[r.function];if(!i)throw new oW(e);let a=i.pikkuFuncId||r.function,o=r.addonConfig?.auth??this.options.requiresAuth,s=[...r.addonConfig?.tags??[],...i.tags??[]];return $0e(`rpc`,e,a,{auth:o,singletonServices:this.services,data:()=>t,wire:n,packageName:r.package,tags:s})}async rpcWithWire(e,t,n){let r=this.wire.rpc?.depth||0,i={...this.wire,...n,rpc:this.wire.rpc?{...this.wire.rpc,depth:r+1,global:!1}:void 0};if(e.includes(`:`))return this.invokeAddonFunction(e,t,i);try{let n=K0e(e,this.packageName);return await $0e(`rpc`,e,n.pikkuFuncId,{auth:this.options.requiresAuth,singletonServices:this.services,data:()=>t,wire:i,packageName:n.packageName})}catch(n){if(n instanceof oW&&this.services.deploymentService){let n=this.wire.getSession&&typeof this.wire.getSession==`function`?await this.wire.getSession():this.wire.session;return this.services.deploymentService.invoke(e,t,n,this.wire.traceId)}throw n}}async startWorkflow(e,t,n){if(!this.services.workflowService)throw Error(`WorkflowService service not available`);let r=this.wire.workflowStep?.runId??this.wire.graph?.runId,i=n?.wire??{type:this.wire.wireType??`unknown`,id:this.wire.wireId,...r?{parentRunId:r}:{},...this.wire.pikkuUserId?{pikkuUserId:this.wire.pikkuUserId}:{}};return this.services.workflowService.startWorkflow(e,t,i,this,n)}get agent(){return{run:async(e,t)=>{let n=await U0e(e,t,{sessionService:this.options.sessionService,getCredential:this.wire.getCredential?.bind(this.wire)});return{runId:n.runId,result:n.object??n.text,usage:n.usage,...n.status===`suspended`&&{status:`suspended`,pendingApprovals:n.pendingApprovals}}},stream:async(e,t,n)=>{let r=this.wire.channel;if(!r)throw Error(`No channel available for streaming`);await F0e(e,t,r,{sessionService:this.options.sessionService,getCredential:this.wire.getCredential?.bind(this.wire)},void 0,n)},resume:async(e,t,n)=>{let r=this.wire.channel;if(!r)throw Error(`No channel available for streaming`);await I0e({runId:e,...t},r,{sessionService:this.options.sessionService,getCredential:this.wire.getCredential?.bind(this.wire)},n)},approve:async(e,t,n)=>{let r=await aW(e,t,{sessionService:this.options.sessionService},n);return{runId:r.runId,result:r.object??r.text,usage:r.usage,...r.status===`suspended`&&{status:`suspended`,pendingApprovals:r.pendingApprovals}}}}}async remote(e,t){if(!this.services.deploymentService)throw Error(`No DeploymentService configured for remote RPC: ${e}. Set up a DeploymentService to enable remote function calls.`);let n=this.wire.getSession&&typeof this.wire.getSession==`function`?await this.wire.getSession():this.wire.session;return this.services.deploymentService.invoke(e,t,n,this.wire.traceId)}};const J0e=new class{getContextRPCService(e,t,n,r=0,i=null){let a=new q0e(e,t,typeof n==`object`&&n?n:{requiresAuth:n},i);return{depth:r,global:!1,invoke:a.rpc.bind(a),remote:a.remote.bind(a),exposed:a.rpcExposed.bind(a),startWorkflow:a.startWorkflow.bind(a),get agent(){return a.agent},rpcWithWire:a.rpcWithWire.bind(a)}}};async function Y0e(e,t,n){let r=l0e(e);r&&(e.pikkuUserId=r,n instanceof s0e&&n.setPikkuUserId(r));let{sessionStore:i}=t;if(!(!i||!r))if(e.session)n?.setInitial(e.session);else{let t=await i.get(r);t&&(e.session=t,n?.setInitial(t))}}var X0e=e=>{let t=BU(null,`addons`,`packages`);if(!t)return null;for(let[n,r]of t.entries())if(r?.package===e)return n;return null},Z0e=(e,t)=>new Proxy(e,{get(e,n,r){if(n===`startWorkflow`||n===`runToCompletion`){let i=Reflect.get(e,n,r);return function(e,...n){if(typeof e==`string`&&!e.includes(`:`)){let n=X0e(t);n&&(e=`${n}:${e}`)}return i.call(this,e,...n)}}return Reflect.get(e,n,r)}}),Q0e=async(e,t)=>{let n=BU(e,`package`,`singletonServices`);if(n)return n;let r=BU(e,`package`,`factories`);if(!r||!r.createSingletonServices)return t;let i=t.config;r.createConfig&&(i=await r.createConfig(t.variables));let a=await r.createSingletonServices(i,t);return a.workflowService&&typeof a.workflowService==`object`&&(a.workflowService=Z0e(a.workflowService,e)),BU(e,`package`,`singletonServices`,a),a};const $0e=async(e,t,n,{singletonServices:r,createWireServices:i,data:a,auth:o,inheritedMiddleware:s,wireMiddleware:c,inheritedChannelMiddleware:l,wireChannelMiddleware:u,inheritedPermissions:d,wirePermissions:f,coerceDataFromSchema:p,tags:m=[],wire:h,sessionService:g,credentialWireService:_,packageName:v=null})=>{h.wireType??=e,h.wireId??=t;let y=BU(v,`function`,`functions`),b=y.get(n),x=BU(v,`function`,`meta`),S=x[n];if(!b||!S){let{baseName:e,version:t}=o0e(n);t!==null&&(b||=y.get(e),S||=x[e],b&&S&&r.logger.warn(`Version '${n}' not registered, resolved to '${e}'`))}if(!b)throw Error(`Function not found: ${n}`);if(!S)throw Error(`Function meta not found: ${n}`);let C=S.pikkuFuncId??n,w=v?await Q0e(v,r):r,T=i;if(v){let e=BU(v,`package`,`factories`);e?.createWireServices&&(T=e.createWireServices)}let E=Y1e(e,t,{wireInheritedChannelMiddleware:l,wireChannelMiddleware:u,packageName:v}),D=E.length>0&&h.channel?X1e(h,w,E):h;if(!D.getCredentials){let e=_??new u0e(w.credentialService,D);Object.assign(D,d0e(e))}let O=f0e(b.audit),k=D,ee=k.functionId,te=k.audit,ne=Object.getOwnPropertyDescriptor(k,`rpc`);k.functionId=C,k.audit=O;let re;re=m&&m.length>0?[...d||[],...m.map(e=>({type:`tag`,tag:e}))]:d||[];let ie=async()=>{await Y0e(k,w,g),g&&(k.session=g.freezeInitial(),k.setSession=e=>g.set(e),k.clearSession=()=>g.clear(),k.getSession=()=>g.get(),k.hasSessionChanged=()=>g.sessionChanged);let r=k.session;if(S.sessionless){if((o===!0||b.auth===!0)&&!r)throw new GU(`Authentication required`)}else if((o===!1||b.auth===!1)&&w.logger.warn(`Function '${n}' requires a session but auth was explicitly disabled — use pikkuSessionlessFunc instead.`),!r)throw new GU(`Authentication required`);if(r?.readonly&&!S.readonly)throw new I1e;let i=await a(),s=S.inputSchemaName;s&&(p&&r0e(s,i,v),await i0e(w.logger,w.schema,s,i,v)),(re.length>0||f||S.permissions||b.permissions)&&await e0e(e,t,{wireInheritedPermissions:re,wirePermissions:f,funcInheritedPermissions:S.permissions,funcPermissions:b.permissions,services:w,wire:k,data:i,packageName:v});let c;try{c=await T?.(w,k);let e=c&&Object.keys(c).length>0?{...w,...c}:w,t=v;return Object.defineProperty(k,`rpc`,{get(){let n=J0e.getContextRPCService(e,k,{sessionService:g},0,t);return Object.defineProperty(k,`rpc`,{value:n,writable:!0,configurable:!0}),n},configurable:!0,enumerable:!0}),await b.func(e,i,k)}finally{c&&Object.keys(c).length>0&&await B1e(w.logger,c)}},ae=q1e(e,t,{wireInheritedMiddleware:s,wireMiddleware:c,funcInheritedMiddleware:S.middleware,funcMiddleware:b.middleware,packageName:v});if(ae.length>0)try{return await U1e(w,k,ae,ie)}finally{ne&&Object.defineProperty(k,`rpc`,ne),ee===void 0?delete k.functionId:k.functionId=ee,te===void 0?delete k.audit:k.audit=te}try{return await ie()}finally{ne&&Object.defineProperty(k,`rpc`,ne),ee===void 0?delete k.functionId:k.functionId=ee,te===void 0?delete k.audit:k.audit=te}};function e2e(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function t2e(e,t){if(t.length===0)return null;let n=e.commands[t[0]];if(!n)return null;for(let e=1;e<t.length;e++){if(!n.subcommands||!n.subcommands[t[e]])return null;n=n.subcommands[t[e]]}return n}function n2e(e,t){let n={...e.options};if(t.length===0)return n;let r=e.commands[t[0]];if(r){n={...n,...r.options};for(let e=1;e<t.length;e++)r.subcommands&&r.subcommands[t[e]]&&(r=r.subcommands[t[e]],n={...n,...r.options})}return n}function r2e(e,t,n=[]){let r=[],i=t.programs[e];if(!i)return`Program not found: ${e}`;if(n.length===0){r.push(`Usage: ${e} <command> [options]`),r.push(``),r.push(`Commands:`);for(let[e,t]of Object.entries(i.commands)){let n=t.description||``,i=t.isDefault?` (default)`:``;r.push(` ${e.padEnd(20)} ${n}${i}`)}Object.keys(i.options).length>0&&(r.push(``),r.push(`Options:`),i2e(i.options,r))}else{let t=t2e(i,n);if(!t)return`Unknown command: ${n.join(` `)}`;let a=`${e} ${n.join(` `)}`;if(t.parameters&&(a+=` `+t.parameters),r.push(`Usage: ${a} [options]`),t.description&&(r.push(``),r.push(t.description)),t.positionals.length>0){r.push(``),r.push(`Arguments:`);for(let e of t.positionals){let t=e.required?`<required>`:`[optional]`,n=e.variadic?`...`:``;r.push(` ${e.name}${n} ${t}`)}}if(t.subcommands&&Object.keys(t.subcommands).length>0){r.push(``),r.push(`Subcommands:`);for(let[e,n]of Object.entries(t.subcommands)){let t=n.description||``;r.push(` ${e.padEnd(20)} ${t}`)}}let o=n2e(i,n);Object.keys(o).length>0&&(r.push(``),r.push(`Options:`),i2e(o,r))}return r.join(`
|
|
186
186
|
`)}function i2e(e,t){for(let[n,r]of Object.entries(e)){let e=` `;r.short?e+=`-${r.short}, `:e+=` `,e+=`--${e2e(n)}`,r.default!==void 0&&typeof r.default!=`boolean`&&(e+=` <value>`),e=e.padEnd(30),e+=r.description||``,r.default!==void 0&&(e+=` (default: ${JSON.stringify(r.default)})`),r.choices&&(e+=` [choices: ${r.choices.join(`, `)}]`),t.push(e)}}var a2e=e=>{let t=e.split(`
|
|
187
187
|
`),n=[],r=!1;for(let e=0;e<t.length;e++){let i=t[e],a=i.trim();if(a===`Commands:`||a===`Subcommands:`||a===`Options:`||i.startsWith(`Usage:`)){r=a===`Commands:`||a===`Subcommands:`,n.push({text:i+`
|
|
188
188
|
`,type:`heading`});continue}if(r&&a===``&&(r=!1),r&&i.startsWith(` `)){let e=i.match(/^(\s{2})(\S+)(\s.*)?$/);if(e){let[,t,r,i]=e;n.push({text:t}),n.push({text:r,type:`command`}),n.push({text:(i||``)+`
|