mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-15 03:02:17 -05:00
60 lines
410 KiB
JavaScript
60 lines
410 KiB
JavaScript
import{e as Qu,r as G,j as w,C as We,T as Xu,f as ed,h as jn,k as td,l as Jn,L as ol,g as mi,u as Yf,a as ll,m as Zf,b as Qf,D as Xf,c as eh,S as th,A as rh,n as nh}from"./index-B0P8L1jr.js";import{c as ih,d as sh,u as ah,g as oh,r as lh,a as ch,b as uh,e as dh,f as fh,h as hh,i as mh,j as ph,k as yh,l as gh,m as vh,n as bh}from"./api-B8GGCEeo.js";function ur(e,t,r={}){return new Promise((n,i)=>{e.emit(t,r,(s={})=>{if(s.error){i(new Error(s.error));return}n(s)})})}function Sh(e,{query:t="",filter:r="all"}={}){return ur(e,"identityAdmin:listUsers",{query:t,filter:r})}function cl(e,t){return ur(e,"identityAdmin:getUser",{userId:t})}function xh(e,t,r,n){return ur(e,"identityAdmin:addSignal",{userId:t,type:r,value:n})}function Ch(e,t,r,n){return ur(e,"identityAdmin:removeSignal",{userId:t,type:r,value:n})}function Ah(e,t,r){return ur(e,"identityAdmin:setVerified",{userId:t,enabled:r})}function wh(e,t,r,n){return ur(e,"identityAdmin:setDeterrence",{userId:t,enabled:r,reason:n})}function $h(e,t,r){return ur(e,"identityAdmin:setMuted",{userId:t,enabled:r})}function _h(e,t,r,n){return ur(e,"identityAdmin:setPermission",{userId:t,permissionKey:r,enabled:n})}function Eh(e,t,r,n){return ur(e,"identityAdmin:updateFeatureState",{userId:t,namespace:r,value:n})}function jh(e,t,r){return ur(e,"identityAdmin:deleteFeatureState",{userId:t,namespace:r})}const Ha={cookieUserId:"Cookie keys",fingerprintId:"Fingerprints",nickname:"Nicknames",knownIp:"Known IPs"},Oh={cookieUserId:"cookieUserIds",fingerprintId:"fingerprintIds",nickname:"nicknames",knownIp:"knownIps"};function ul(e){const t=String(e||"").trim();return t?t.length<=14?t:`${t.slice(0,8)}...${t.slice(-6)}`:"n/a"}function ws(e){const t=Number(e||0);if(!Number.isFinite(t)||t<=0)return"never";try{return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(t))}catch{return new Date(t).toLocaleString()}}function Wa(e){return JSON.stringify(e??{},null,2)}function kh(e){const t=JSON.parse(String(e||"").trim()||"{}");if(!t||typeof t!="object")throw new Error("JSON must be an object or array.");return t}const Ph=[{key:"all",label:"All"},{key:"verified",label:"Verified"},{key:"deterred",label:"Deterred"},{key:"muted",label:"Muted"},{key:"unverified",label:"Unverified"}];function oa({active:e,children:t}){return w.jsx("span",{className:`rounded px-1 py-0.25 text-[0.68rem] font-semibold ${e?"bg-emerald-700 text-emerald-50":"bg-neutral-800 text-neutral-300"}`,children:t})}function Nh({users:e,truncated:t,selectedUserId:r,query:n,filter:i,loading:s,onQuery:a,onFilter:o,onRefresh:l,onSearch:c,onSelect:u}){const d=w.jsx("button",{type:"button",className:"button-dark text-xs",onClick:()=>l(),disabled:s,children:s?"Loading":"Refresh"});return w.jsxs(We,{title:"Identity database",meta:t?`${e.length}+`:e.length,actions:d,bodyClassName:"flex min-h-0 flex-col gap-0.5 p-0.5 text-sm",children:[w.jsxs("form",{className:"grid gap-0.5 md:grid-cols-[minmax(0,1fr)_10rem_auto]",onSubmit:c,children:[w.jsx("input",{className:"field-input text-sm",type:"search",placeholder:"Search users, keys, fingerprints, IPs",value:n,onChange:h=>a(h.target.value)}),w.jsx("select",{className:"field-input text-sm",value:i,onChange:h=>o(h.target.value),children:Ph.map(h=>w.jsx("option",{value:h.key,children:h.label},h.key))}),w.jsx("button",{type:"submit",className:"button-dark text-xs",disabled:s,children:"Search"})]}),t?w.jsx("p",{className:"surface-muted px-1 py-0.5 text-xs text-slate-400",children:"Showing the first 100 matches. Narrow the search to find older users."}):null,w.jsx("div",{className:"min-h-[18rem] flex-1 overflow-y-auto",children:e.length?e.map(h=>w.jsxs("button",{type:"button",className:`surface mb-0.5 grid w-full grid-cols-[minmax(0,1fr)_auto] gap-0.5 px-1 py-0.75 text-left text-xs ${r===h.id?"border border-sky-400/70":""}`,onClick:()=>u(h.id),children:[w.jsxs("span",{className:"min-w-0",children:[w.jsx("span",{className:"block truncate text-sm font-semibold text-slate-100",children:h.nickname||"unknown user"}),w.jsx("span",{className:"block truncate font-mono text-[0.68rem] text-slate-400",children:h.id}),w.jsxs("span",{className:"block truncate text-[0.68rem] text-slate-400",children:[ul(h.cookieUserIds?.[0])," / ",ul(h.fingerprintIds?.[0])]})]}),w.jsxs("span",{className:"flex flex-col items-end gap-0.25",children:[w.jsx(oa,{active:h.verified?.enabled,children:"verified"}),w.jsx(oa,{active:h.deterrence?.enabled,children:"deterred"}),w.jsx(oa,{active:h.deterrence?.muted,children:"muted"})]})]},h.id)):w.jsx("p",{className:"surface p-1 text-center text-xs text-slate-400",children:"No users match this view."})})]})}function Fh({user:e}){return w.jsxs(We,{title:"User details",bodyClassName:"grid gap-0.5 p-0.5 text-sm md:grid-cols-2",children:[w.jsxs("div",{className:"surface px-1 py-0.75",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Canonical user id"}),w.jsx("p",{className:"break-all font-mono text-xs text-lime-300",children:e.id})]}),w.jsxs("div",{className:"surface px-1 py-0.75",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Primary nickname"}),w.jsx("p",{className:"font-semibold text-slate-100",children:e.nickname||"unknown user"})]}),w.jsxs("div",{className:"surface px-1 py-0.75",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Created"}),w.jsx("p",{children:ws(e.createdAt)})]}),w.jsxs("div",{className:"surface px-1 py-0.75",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Last seen"}),w.jsx("p",{children:ws(e.lastSeenAt)})]})]})}function Ih({user:e,type:t,onAdd:r,onRemove:n}){const[i,s]=G.useState(""),a=e?.[Oh[t]]||[],o=async l=>{l.preventDefault();const c=i.trim();c&&(await r(t,c),s(""))};return w.jsxs("div",{className:"surface space-y-0.5 px-1 py-0.75",children:[w.jsx("p",{className:"text-xs font-semibold text-slate-200",children:Ha[t]}),w.jsx("div",{className:"space-y-0.5",children:a.length?a.map(l=>w.jsxs("div",{className:"surface-muted grid grid-cols-[minmax(0,1fr)_auto] items-center gap-0.5 px-1 py-0.5",children:[w.jsx("span",{className:"min-w-0 break-all font-mono text-[0.7rem] text-slate-200",children:l}),w.jsx("button",{type:"button",className:"button-dark text-xs",onClick:()=>n(t,l),children:"Remove"})]},l)):w.jsx("p",{className:"text-xs text-slate-500",children:"No values."})}),w.jsxs("form",{className:"grid gap-0.5 md:grid-cols-[minmax(0,1fr)_auto]",onSubmit:o,children:[w.jsx("input",{className:"field-input text-xs",value:i,placeholder:`Add ${Ha[t].toLowerCase()}`,onChange:l=>s(l.target.value)}),w.jsx("button",{type:"submit",className:"button-dark text-xs",disabled:!i.trim(),children:"Add"})]})]})}function Rh({user:e,onAddSignal:t,onRemoveSignal:r}){return w.jsx(We,{title:"Identity signals",bodyClassName:"grid gap-0.5 p-0.5 text-sm xl:grid-cols-2",children:Object.keys(Ha).map(n=>w.jsx(Ih,{user:e,type:n,onAdd:t,onRemove:r},n))})}function Dh({user:e,onVerified:t,onDeterrence:r,onMuted:n}){const[i,s]=G.useState(e?.deterrence?.reason||"");return w.jsxs(We,{title:"Status",bodyClassName:"grid gap-0.5 p-0.5 text-sm md:grid-cols-2",children:[w.jsxs("div",{className:"surface space-y-0.5 px-1 py-0.75",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Verification"}),w.jsxs("label",{className:"flex items-center gap-0.5 text-slate-100",children:[w.jsx("input",{type:"checkbox",className:"h-3.5 w-3.5 accent-emerald-500",checked:!!e?.verified?.enabled,onChange:a=>t(a.target.checked)}),w.jsx("span",{children:"Verified"})]}),w.jsxs("p",{className:"text-xs text-slate-500",children:["Updated ",ws(e?.verified?.at)]})]}),w.jsxs("div",{className:"surface space-y-0.5 px-1 py-0.75",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Deterrence"}),w.jsxs("label",{className:"flex items-center gap-0.5 text-slate-100",children:[w.jsx("input",{type:"checkbox",className:"h-3.5 w-3.5 accent-red-500",checked:!!e?.deterrence?.enabled,onChange:a=>r(a.target.checked,i)}),w.jsx("span",{children:"Deterred"})]}),w.jsx("textarea",{className:"field-input min-h-[4rem] w-full text-xs",value:i,placeholder:"Deterrence reason",onChange:a=>s(a.target.value)}),w.jsx("button",{type:"button",className:"button-dark text-xs",onClick:()=>r(!!e?.deterrence?.enabled,i),children:"Save Reason"}),w.jsxs("div",{className:"border-t border-slate-700/70 pt-0.5",children:[w.jsxs("label",{className:"flex items-center gap-0.5 text-slate-100",children:[w.jsx("input",{type:"checkbox",className:"h-3.5 w-3.5 accent-amber-500",checked:!!e?.deterrence?.muted,onChange:a=>n(a.target.checked)}),w.jsx("span",{children:"Muted"})]}),w.jsxs("p",{className:"text-xs text-slate-500",children:["Updated ",ws(e?.deterrence?.mutedAt)]})]})]})]})}function Th({user:e,onSaveFeature:t,onDeleteFeature:r}){const n=Object.keys(e?.features||{}).sort(),i=n[0]||"",[s,a]=G.useState(i),[o,l]=G.useState(Wa(i?e.features[i]:{})),[c,u]=G.useState(""),d=async()=>{const m=s.trim();if(!m){u("Namespace required.");return}try{const g=kh(o);await t(m,g),u("")}catch(g){u(g.message||"Invalid JSON.")}},h=async()=>{const m=s.trim();m&&window.confirm(`Delete feature state "${m}" from ${e.id}?`)&&(await r(m),a(""),l("{}"),u(""))};return w.jsxs(We,{title:"Feature state",bodyClassName:"space-y-0.5 p-0.5 text-sm",children:[w.jsxs("div",{className:"grid gap-0.5 md:grid-cols-[minmax(0,1fr)_auto_auto]",children:[w.jsx("input",{className:"field-input text-sm",value:s,placeholder:"Namespace",list:"identity-feature-namespaces",onChange:m=>{const g=m.target.value;a(g),l(Wa(e.features?.[g]||{}))}}),w.jsx("datalist",{id:"identity-feature-namespaces",children:n.map(m=>w.jsx("option",{value:m},m))}),w.jsx("button",{type:"button",className:"button-dark text-xs",onClick:d,children:"Save"}),w.jsx("button",{type:"button",className:"button-dark text-xs",onClick:h,disabled:!s.trim(),children:"Delete"})]}),w.jsx("textarea",{className:"field-input min-h-[18rem] w-full font-mono text-xs",value:o,spellCheck:!1,onChange:m=>l(m.target.value)}),c?w.jsx("p",{className:"surface text-xs text-red-300",children:c}):null]})}function Mh({user:e}){return w.jsx(We,{title:"Raw record",bodyClassName:"p-0.5 text-xs",children:w.jsx("pre",{className:"surface max-h-[36rem] overflow-auto whitespace-pre-wrap break-words font-mono text-[0.7rem] text-lime-300",children:Wa(e)})})}function Uh({user:e,permissions:t,onPermission:r}){const n=new Set((e?.permissions||[]).map(i=>i.key));return w.jsx(We,{title:"Permissions",bodyClassName:"grid gap-0.5 p-0.5 text-sm md:grid-cols-2",children:t.map(i=>w.jsxs("label",{className:"surface space-y-0.5 px-1 py-0.75 text-slate-100",children:[w.jsxs("span",{className:"flex items-center gap-0.5 font-semibold",children:[w.jsx("input",{type:"checkbox",className:"h-3.5 w-3.5 accent-emerald-500",checked:n.has(i.key),onChange:s=>r(i.key,s.target.checked)}),i.label]}),w.jsx("span",{className:"block text-xs text-slate-400",children:i.description}),w.jsx("code",{className:"block text-[0.68rem] text-lime-300",children:i.key})]},i.key))})}function qh(){const e=Qu(),[t,r]=G.useState([]),[n,i]=G.useState([]),[s,a]=G.useState(null),[o,l]=G.useState(""),[c,u]=G.useState("all"),[d,h]=G.useState(!1),[m,g]=G.useState(!1),[b,v]=G.useState(""),y=G.useCallback(async()=>{g(!0);try{const L=await Sh(e,{query:o,filter:c});if(r(L.users||[]),h(!!L.truncated),i(L.permissions||[]),s?.id){const K=await cl(e,s.id);a(K.user||null)}v("")}catch(L){v(L.message||"Failed to load users.")}finally{g(!1)}},[c,o,s?.id,e]),f=G.useCallback(async L=>{g(!0);try{const K=await cl(e,L);a(K.user||null),v("")}catch(K){v(K.message||"Failed to load user.")}finally{g(!1)}},[e]),A=G.useCallback(L=>{a(L||null),L?.id&&r(K=>K.map(B=>B.id===L.id?{...B,...L}:B))},[]),O=G.useCallback(async(L,K)=>{if(s?.id){g(!0);try{const B=await L(s.id);A(B.user),v(K||"Saved.")}catch(B){v(B.message||"Save failed.")}finally{g(!1)}}},[A,s?.id]);G.useEffect(()=>{y()},[]);const p=L=>{L.preventDefault(),y()},x=(L,K)=>O(B=>xh(e,B,L,K),"Signal added."),$=(L,K)=>O(B=>Ch(e,B,L,K),"Signal removed."),k=L=>O(K=>Ah(e,K,L),"Verification updated."),N=(L,K)=>O(B=>wh(e,B,L,K),"Deterrence updated."),I=L=>O(K=>$h(e,K,L),"Mute updated."),U=(L,K)=>O(B=>_h(e,B,L,K),"Permission updated."),q=(L,K)=>O(B=>Eh(e,B,L,K),"Feature state saved."),M=L=>O(K=>jh(e,K,L),"Feature state deleted.");return w.jsxs("div",{className:"grid min-h-0 flex-1 gap-0.5 lg:grid-cols-[24rem_minmax(0,1fr)]",children:[w.jsx(Nh,{users:t,truncated:d,selectedUserId:s?.id||null,query:o,filter:c,loading:m,onQuery:l,onFilter:u,onRefresh:y,onSearch:p,onSelect:f}),w.jsxs("div",{className:"min-h-0 space-y-0.5 overflow-y-auto",children:[b?w.jsx(We,{title:"Status",bodyClassName:"p-0.5 text-sm text-slate-200",children:w.jsx("p",{children:b})}):null,s?w.jsxs(w.Fragment,{children:[w.jsx(Fh,{user:s}),w.jsxs(Xu,{defaultTab:"signals",children:[w.jsxs(ed,{children:[w.jsx(jn,{id:"signals",children:"Signals"}),w.jsx(jn,{id:"status",children:"Status"}),w.jsx(jn,{id:"permissions",children:"Permissions"}),w.jsx(jn,{id:"features",children:"Feature state"}),w.jsx(jn,{id:"raw",children:"Raw JSON"})]}),w.jsxs(td,{children:[w.jsx(Jn,{id:"signals",children:w.jsx(Rh,{user:s,onAddSignal:x,onRemoveSignal:$})}),w.jsx(Jn,{id:"status",children:w.jsx(Dh,{user:s,onVerified:k,onDeterrence:N,onMuted:I},`status-${s.id}`)}),w.jsx(Jn,{id:"permissions",children:w.jsx(Uh,{user:s,permissions:n,onPermission:U})}),w.jsx(Jn,{id:"features",children:w.jsx(Th,{user:s,onSaveFeature:q,onDeleteFeature:M},`features-${s.id}`)}),w.jsx(Jn,{id:"raw",children:w.jsx(Mh,{user:s})})]})]})]}):w.jsx(We,{title:"User details",bodyClassName:"p-1 text-center text-sm text-slate-400",children:"Select a user to inspect and edit the identity record."})]})]})}function Lh({administrator:e,socket:t,runSensitive:r,onSnapshot:n}){const[i,s]=G.useState({username:e.username,discordId:e.discordId,role:e.role,password:""}),[a,o]=G.useState(!1),[l,c]=G.useState("");G.useEffect(()=>{s({username:e.username,discordId:e.discordId,role:e.role,password:""})},[e]);async function u(d){o(!0),c("");try{const h=await r(d);n(h.snapshot)}catch(h){c(h.message)}finally{o(!1)}}return w.jsxs("div",{className:"surface space-y-0.5 p-0.5",children:[w.jsxs("div",{className:"grid gap-0.5 md:grid-cols-4",children:[w.jsx("input",{className:"field-input",value:i.username,onChange:d=>s({...i,username:d.target.value})}),w.jsx("input",{className:"field-input",placeholder:"Discord id",value:i.discordId,onChange:d=>s({...i,discordId:d.target.value})}),w.jsxs("select",{className:"field-input",value:i.role,onChange:d=>s({...i,role:d.target.value}),children:[w.jsx("option",{value:"admin",children:"Administrator"}),w.jsx("option",{value:"lockdown",children:"Lockdown administrator"})]}),w.jsx("input",{className:"field-input",type:"password",autoComplete:"new-password",placeholder:"New password (optional)",value:i.password,onChange:d=>s({...i,password:d.target.value})})]}),l?w.jsx("p",{className:"text-xs text-red-300",children:l}):null,w.jsxs("div",{className:"flex justify-end gap-0.5",children:[w.jsx("button",{type:"button",className:"button-danger text-xs",disabled:a,onClick:()=>u(()=>sh(t,e.id)),children:"Delete"}),w.jsx("button",{type:"button",className:"button-dark text-xs",disabled:a,onClick:()=>u(()=>ah(t,{id:e.id,...i})),children:"Save account"})]})]})}function Vh({administrators:e,socket:t,runSensitive:r,onSnapshot:n}){const[i,s]=G.useState({username:"",discordId:"",role:"admin",password:""}),[a,o]=G.useState(!1),[l,c]=G.useState("");async function u(d){d.preventDefault(),o(!0),c("");try{const h=await r(()=>ih(t,i));n(h.snapshot),s({username:"",discordId:"",role:"admin",password:""})}catch(h){c(h.message)}finally{o(!1)}}return w.jsxs(We,{title:"Administrator accounts",meta:e.length,bodyClassName:"space-y-0.5 p-0.5 text-sm",children:[w.jsxs("form",{className:"surface grid gap-0.5 p-0.5 md:grid-cols-4",onSubmit:u,children:[w.jsx("input",{className:"field-input",placeholder:"Username",value:i.username,onChange:d=>s({...i,username:d.target.value})}),w.jsx("input",{className:"field-input",placeholder:"Discord id (optional)",value:i.discordId,onChange:d=>s({...i,discordId:d.target.value})}),w.jsxs("select",{className:"field-input",value:i.role,onChange:d=>s({...i,role:d.target.value}),children:[w.jsx("option",{value:"admin",children:"Administrator"}),w.jsx("option",{value:"lockdown",children:"Lockdown administrator"})]}),w.jsx("input",{className:"field-input",type:"password",autoComplete:"new-password",placeholder:"Password",value:i.password,onChange:d=>s({...i,password:d.target.value})}),l?w.jsx("p",{className:"text-xs text-red-300 md:col-span-3",children:l}):w.jsx("span",{className:"md:col-span-3"}),w.jsx("button",{className:"button-dark",type:"submit",disabled:a||!i.username||!i.password,children:a?"Creating…":"Create account"})]}),(e||[]).map(d=>w.jsx(Lh,{administrator:d,socket:t,runSensitive:r,onSnapshot:n},d.id))]})}function la(e){return Number.isFinite(Number(e))?new Date(Number(e)).toLocaleString():"unknown"}function zh({snapshot:e,socket:t,runSensitive:r,onSnapshot:n}){const i=e.configuration,[s,a]=G.useState(!1),[o,l]=G.useState(null),[c,u]=G.useState("");G.useEffect(()=>{let f=!0;async function A(){if(t.connected)try{const p=await oh(t);if(!f)return;l(p.lifecycle),u("")}catch(p){f&&u(p.message)}}A();const O=window.setInterval(A,2500);return()=>{f=!1,window.clearInterval(O)}},[t]),G.useEffect(()=>{if(!s)return;const f=()=>a(!1);return t.once("connect",f),()=>t.off("connect",f)},[s,t]);async function d(f){if(window.confirm(`Restore configuration revision ${f}? This creates and immediately applies a new active revision.`))try{const A=await r(()=>lh(t,{revision:f,expectedRevision:i.revision}));n(A.snapshot)}catch(A){window.alert(A.message)}}async function h(){if(window.confirm("Restart the MultiRover application now? Connected rovers and browsers will disconnect briefly; the server host will not reboot.")){a(!0);try{await r(()=>ch(t))}catch(f){a(!1),window.alert(f.message)}}}async function m(){try{const f=await r(()=>uh(t));l(f.lifecycle)}catch(f){u(f.message)}}async function g(){if(window.confirm("Pull the configured MultiRover image and replace the application container now? The page will reconnect automatically."))try{const f=await r(()=>dh(t));l(f.lifecycle)}catch(f){u(f.message)}}const b=o?.state==="running",v=!!o?.available,y=o?.updateAvailable===!0?"An update is available.":o?.updateAvailable===!1?"The running application matches the latest checked image.":"Check for updates to compare the running container with the configured image.";return w.jsxs("div",{className:"space-y-0.5",children:[w.jsxs(We,{title:"Administration overview",meta:`revision ${i.revision}`,bodyClassName:"grid gap-0.5 p-0.5 md:grid-cols-3",children:[w.jsxs("div",{className:"surface p-1",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Active revision"}),w.jsx("p",{className:"text-xl font-semibold",children:i.revision})]}),w.jsxs("div",{className:"surface p-1",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Administrators"}),w.jsx("p",{className:"text-xl font-semibold",children:e.administrators.length})]}),w.jsxs("div",{className:"surface p-1",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Last configuration save"}),w.jsx("p",{className:"text-sm font-semibold",children:la(i.createdAt)})]})]}),w.jsxs(We,{title:"Existing administration surfaces",bodyClassName:"flex flex-wrap gap-0.5 p-0.5 text-sm",children:[w.jsx(ol,{className:"button-dark",to:"/reports",children:"Open fleet reports"}),w.jsx(ol,{className:"button-dark",to:"/",children:"Open driver application"})]}),w.jsxs(We,{title:"Application container",meta:v?o?.state:"controller unavailable",bodyClassName:"space-y-1 p-1 text-sm",children:[w.jsxs("div",{className:"surface max-w-4xl space-y-0.5 p-1 text-slate-300",children:[w.jsx("p",{children:v?y:"Container updates are unavailable until the lifecycle service is running."}),o?.message?w.jsx("p",{className:"text-slate-400",children:o.message}):null,o?.rollback?w.jsxs("p",{children:["Rollback: ",o.rollback.status,o.rollback.error?` — ${o.rollback.error}`:""]}):null,c?w.jsx("p",{className:"text-red-300",children:c}):null]}),w.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[w.jsx("button",{type:"button",className:"button-dark",disabled:!v||b,onClick:m,children:o?.operation==="check"&&b?"Checking for update…":"Check for update"}),w.jsx("button",{type:"button",className:"button-danger",disabled:!v||b,onClick:g,children:o?.operation==="update"&&b?"Updating application…":"Update and restart"}),w.jsx("button",{type:"button",className:"button-danger",disabled:s||b,onClick:h,children:s?"Waiting for application…":"Restart application"})]})]}),w.jsx(We,{title:"Configuration revisions",meta:e.revisions.length,bodyClassName:"max-h-64 overflow-y-auto p-0.5 text-xs",children:e.revisions.map(f=>w.jsxs("div",{className:"surface mb-0.5 grid items-center gap-0.5 p-0.5 md:grid-cols-[5rem_1fr_1fr_1fr_auto]",children:[w.jsxs("span",{children:["#",f.revision]}),w.jsx("span",{children:la(f.createdAt)}),w.jsx("span",{children:f.actor}),w.jsx("span",{children:f.source}),w.jsx("button",{type:"button",className:"button-dark text-xs",disabled:f.revision===i.revision,onClick:()=>d(f.revision),children:"Restore"})]},f.revision))}),w.jsx(We,{title:"Persistent audit history",meta:e.auditEvents.length,bodyClassName:"max-h-96 overflow-y-auto p-0.5 text-xs",children:e.auditEvents.map(f=>w.jsxs("div",{className:"surface mb-0.5 grid gap-0.5 p-0.5 md:grid-cols-[10rem_10rem_1fr]",children:[w.jsx("span",{children:la(f.createdAt)}),w.jsx("span",{children:f.actor}),w.jsx("span",{children:f.action})]},f.id))})]})}function Bh(e){const t=Number(e)||0;if(t<1024)return`${t} B`;const r=["KiB","MiB","GiB","TiB"];let n=t/1024,i=0;for(;n>=1024&&i<r.length-1;)n/=1024,i+=1;return`${n.toFixed(n>=10?1:2)} ${r[i]}`}function Kh({socket:e,runSensitive:t}){const[r,n]=G.useState(!1),[i,s]=G.useState(!1),[a,o]=G.useState(null),[l,c]=G.useState(null),[u,d]=G.useState(null),[h,m]=G.useState("");G.useEffect(()=>{fh(e).then(y=>d(y.lastRestore)).catch(y=>m(y.message))},[e]);async function g(){n(!0),m("Creating consistent database snapshots and copying server data…");try{const y=await t(()=>hh(e)),f=document.createElement("a");f.href=y.downloadUrl,f.download="",document.body.appendChild(f),f.click(),f.remove();const A=y.skippedUnstableFiles?.length||0;m(`Backup download started with ${y.fileCount} files.${A?` ${A} actively changing file(s) were skipped.`:""}`)}catch(y){m(y.message)}finally{n(!1)}}async function b(){if(a){s(!0),c(null),m("Uploading and validating the selected backup…");try{const y=await t(()=>mh(e)),f=await fetch(y.uploadUrl,{method:"PUT",headers:{"Content-Type":"application/gzip"},body:a}),A=await f.json();if(!f.ok||A.error)throw new Error(A.error||"Restore upload failed.");c(A),m("Backup validated. Review the summary before replacing server data.")}catch(y){m(y.message)}finally{s(!1)}}}async function v(){if(!(!l||!window.confirm("Replace the complete server data folder with this backup and restart the application? Configuration, administrators, identities, history, and media will all be replaced."))){s(!0);try{await t(()=>ph(e,l.restoreId)),m("Restore accepted. Waiting for the application to restart…")}catch(f){s(!1),m(f.message)}}}return w.jsxs("div",{className:"space-y-0.5",children:[w.jsxs(We,{title:"Full backup",bodyClassName:"space-y-0.5 p-1 text-sm",children:[w.jsx("p",{className:"text-slate-300",children:"Downloads configuration, administrator accounts, secrets, identities, history, snapshots, replays, and other durable server data. Keep the archive private because it contains credentials."}),w.jsx("button",{type:"button",className:"button-dark",disabled:r||i,onClick:g,children:r?"Creating backup…":"Download full backup"})]}),w.jsxs(We,{title:"Full restore",bodyClassName:"space-y-0.5 p-1 text-sm",children:[w.jsx("p",{className:"text-slate-300",children:"Upload a MultiRover full backup for validation. Nothing changes until the validated restore is confirmed."}),w.jsxs("div",{className:"flex max-w-3xl flex-col gap-0.5 md:flex-row",children:[w.jsx("input",{className:"field-input min-w-0 flex-1",type:"file",accept:".gz,.tgz,application/gzip",disabled:i||r,onChange:y=>{o(y.target.files?.[0]||null),c(null)}}),w.jsx("button",{type:"button",className:"button-dark",disabled:!a||i||r,onClick:b,children:i&&!l?"Validating…":"Validate backup"})]}),l?w.jsxs("div",{className:"surface max-w-3xl space-y-0.5 p-1",children:[w.jsxs("p",{children:[l.summary.fileCount," files, ",Bh(l.summary.totalBytes)]}),w.jsxs("p",{children:["Created ",new Date(l.summary.createdAt).toLocaleString()," by application version ",l.summary.applicationVersion]}),w.jsx("button",{type:"button",className:"button-danger",disabled:i,onClick:v,children:"Replace data and restart"})]}):null]}),h?w.jsx(We,{title:"Backup and restore status",bodyClassName:"p-1 text-sm text-slate-200",children:w.jsx("p",{children:h})}):null,u?w.jsx(We,{title:"Last restore",meta:u.status,bodyClassName:"p-1 text-sm text-slate-300",children:w.jsxs("p",{children:[u.completedAt?new Date(u.completedAt).toLocaleString():"Completion time unavailable",u.error?` — ${u.error}`:""]})}):null]})}function le(e){return typeof e!="object"||e===null||"lastModified"in e&&typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||"getMonth"in e&&typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Hh(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),le(e.additionalItems)}function xo(e){const t=typeof navigator<"u"?navigator.languages:void 0;if(t)try{return new Intl.NumberFormat(t).formatToParts(1.1).find(i=>i.type==="decimal")?.value||"."}catch{}return"."}function dl(e){if(e==="")return;if(e===null)return null;const t=xo(),r=typeof e=="string"&&t!=="."?e.replace(t,"."):e;if(/\.$/.test(r)||/\.0$/.test(r)||/\.\d*0$/.test(r))return e;const n=Number(r);return typeof n=="number"&&!Number.isNaN(n)?n:e}const sn=Symbol("__additional_property"),rn="additionalProperties",or="allOf",Oe="anyOf",Et="const",cn="default",ci="dependencies",Wh="else",Gh="enum",pt="__errors",Te="$id",Us="if",un="items",Jh="_$junk_option_schema_id$_",ms="$name",ve="oneOf",$s="patternProperties",Qe="properties",ca="readonly",rd="required",_s="submitButtonOptions",Ke="$ref",Yh="then",ps=Symbol("__rjsf_ref"),Co=Symbol("__rjsf_ref_cycle"),ni="$schema",nd="root",id="_",Zh=["discriminator","propertyName"],fl="formContext",Qh="layoutGridLookupMap",sd="__rjsf",Ao=`${sd}_additionalProperties`,ad=`${sd}_rootSchema`,Xh="ui:field",wo="ui:widget",Pr="ui:options",Ga="ui:globalOptions",em="ui:definitions",tm="https://json-schema.org/draft/2019-09/schema",ys="https://json-schema.org/draft/2020-12/schema";function me(e={},t={}){return e?Object.keys(e).filter(r=>r.startsWith("ui:")).reduce((r,n)=>{const i=e[n];return n===wo&&le(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):n===Pr&&le(i)?{...r,...i}:{...r,[n.substring(3)]:i}},{...t}):{...t}}function rm(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:n=!0}=me(t);return n===!1?n:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function yr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ja(e){const t={[pt]:[],addError(r){this[pt].push(r)}};return Array.isArray(e)?e.reduce((r,n,i)=>({...r,[i]:Ja(n)}),t):yr(e)?Object.keys(e).reduce((r,n)=>({...r,[n]:Ja(e[n])}),t):t}const{getOwnPropertyNames:hl,getOwnPropertySymbols:nm}=Object,{hasOwnProperty:im}=Object.prototype;function Yn(e,t){return function(n,i,s){return e(n,i,s)&&t(n,i,s)}}function Zn(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);const{cache:s}=i,a=s.get(r),o=s.get(n);if(a&&o)return a===n&&o===r;s.set(r,n),s.set(n,r);const l=e(r,n,i);return s.delete(r),s.delete(n),l}}function ml(e){const t=nm(e);return t.length?hl(e).concat(t):hl(e)}const sm=Object.hasOwn||((e,t)=>im.call(e,t)),am="__v",om="__o",lm="_owner",cm=typeof Float16Array<"u",{getOwnPropertyDescriptor:pl,keys:yl}=Object,yn=Object.is||function(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r};function um(e,t){return e===t}function dm(e,t){return e.byteLength===t.byteLength&&Es(new Uint8Array(e),new Uint8Array(t))}function fm(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function hm(e,t){return e.byteLength===t.byteLength&&Es(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function mm(e,t){return yn(e.getTime(),t.getTime())}function gl(e,t,r){return e.name===t.name&&e.message===t.message&&e.stack===t.stack&&r.equals(e.cause,t.cause,"cause","cause",e,t,r)}function vl(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Uint8Array(n),s=e.entries();let a,o,l=0;for(;(a=s.next())&&!a.done;){const c=t.entries();let u=0,d=0;for(;(o=c.next())&&!o.done;){if(i[d]){d++;continue}const h=a.value,m=o.value;if(r.equals(h[0],m[0],l,d,e,t,r)&&r.equals(h[1],m[1],h[0],m[0],e,t,r)){u=i[d]=1;break}d++}if(!u)return!1;l++}return!0}function bl(e,t,r){const n=yl(e);let i=n.length;if(yl(t).length!==i)return!1;for(;i-- >0;)if(!od(e,t,r,n[i]))return!1;return!0}function An(e,t,r){const n=ml(e);let i=n.length;if(ml(t).length!==i)return!1;let s,a,o;for(;i-- >0;)if(s=n[i],!od(e,t,r,s)||(a=pl(e,s),o=pl(t,s),(a||o)&&(!a||!o||a.configurable!==o.configurable||a.enumerable!==o.enumerable||a.writable!==o.writable)))return!1;return!0}function pm(e,t){return yn(e.valueOf(),t.valueOf())}function ym(e,t){return e.source===t.source&&e.flags===t.flags}function Sl(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Uint8Array(n),s=e.values();let a,o;for(;(a=s.next())&&!a.done;){const l=t.values();let c=0,u=0;for(;(o=l.next())&&!o.done;){if(!i[u]&&r.equals(a.value,o.value,a.value,o.value,e,t,r)){c=i[u]=1;break}u++}if(!c)return!1}return!0}function Es(e,t){let r=e.length;if(t.length!==r||e.byteOffset!==t.byteOffset)return!1;if(e instanceof Float64Array||e instanceof Float32Array||cm&&e instanceof Float16Array){for(;r-- >0;)if(e[r]!==t[r]&&(e[r]===e[r]||t[r]===t[r]))return!1;return!0}for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function gm(e,t){return e.href===t.href?!0:e.protocol===t.protocol&&e.username===t.username&&e.password===t.password&&e.host===t.host&&e.pathname===t.pathname&&e.hash===t.hash&&vm(e.searchParams,t.searchParams)}function vm(e,t){const r=e.toString(),n=t.toString();return r===n||xl(r)===xl(n)}function xl(e){return e.split("&").sort().join("&")}function od(e,t,r,n){return(n===lm||n===om||n===am)&&(e.$$typeof||t.$$typeof)?!0:sm(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const bm=Object.prototype.toString;function Sm(e){const t=wm(e),{areArraysEqual:r,areDatesEqual:n,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:o,areRegExpsEqual:l,areSetsEqual:c,getUnsupportedCustomComparator:u}=e;return function(h,m,g){if(h===m)return!0;if(h==null||m==null)return!1;const b=typeof h;if(b!==typeof m)return!1;if(b!=="object")return b==="number"||b==="bigint"?a(h,m,g):b==="function"?i(h,m,g):!1;const v=h.constructor;if(v!==m.constructor)return!1;if(v===Object)return o(h,m,g);if(v===Array)return r(h,m,g);if(v===Date)return n(h,m,g);if(v===RegExp)return l(h,m,g);if(v===Map)return s(h,m,g);if(v===Set)return c(h,m,g);if(v===Promise)return!1;if(Array.isArray(h))return r(h,m,g);const y=bm.call(h),f=t[y];if(f)return f(h,m,g);const A=u&&u(h,m,g,y);return A?A(h,m,g):!1}}function xm({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:dm,areArraysEqual:r?An:fm,areDataViewsEqual:hm,areDatesEqual:mm,areErrorsEqual:r?Yn(gl,An):Yn(gl,bl),areFunctionsEqual:um,areMapsEqual:r?Yn(vl,An):vl,areNumbersEqual:yn,areObjectsEqual:r?An:bl,arePrimitiveWrappersEqual:pm,areRegExpsEqual:ym,areSetsEqual:r?Yn(Sl,An):Sl,areTypedArraysEqual:r?Yn(Es,An):Es,areUrlsEqual:gm,getUnsupportedCustomComparator:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Zn(n.areArraysEqual),s=Zn(n.areErrorsEqual),a=Zn(n.areMapsEqual),o=Zn(n.areObjectsEqual),l=Zn(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areErrorsEqual:s,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return n}function Cm(e){return function(t,r,n,i,s,a,o){return e(t,r,o)}}function Am({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(o,l){const{cache:c=e?new WeakMap:void 0,meta:u}=r();return t(o,l,{cache:c,equals:n,meta:u,strict:i})};if(e)return function(o,l){return t(o,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const s={cache:void 0,equals:n,meta:void 0,strict:i};return function(o,l){return t(o,l,s)}}function wm({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:a,areObjectsEqual:o,arePrimitiveWrappersEqual:l,areRegExpsEqual:c,areSetsEqual:u,areTypedArraysEqual:d,areUrlsEqual:h}){return{"[object Arguments]":o,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":s,"[object BigInt]":l,"[object BigInt64Array]":d,"[object BigUint64Array]":d,"[object Boolean]":l,"[object DataView]":r,"[object Date]":n,"[object Error]":i,"[object Float16Array]":d,"[object Float32Array]":d,"[object Float64Array]":d,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":d,"[object Int16Array]":d,"[object Int32Array]":d,"[object Map]":a,"[object Number]":l,"[object Object]":(m,g,b)=>typeof m.then!="function"&&typeof g.then!="function"&&o(m,g,b),"[object RegExp]":c,"[object Set]":u,"[object String]":l,"[object URL]":h,"[object Uint8Array]":d,"[object Uint8ClampedArray]":d,"[object Uint16Array]":d,"[object Uint32Array]":d}}vr();vr({strict:!0});vr({circular:!0});vr({circular:!0,strict:!0});vr({createInternalComparator:()=>yn});vr({strict:!0,createInternalComparator:()=>yn});vr({circular:!0,createInternalComparator:()=>yn});vr({circular:!0,createInternalComparator:()=>yn,strict:!0});function vr(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,s=xm(e),a=Sm(s),o=r?r(a):Cm(a);return Am({circular:t,comparator:a,createState:n,equals:o,strict:i})}const Ae=vr({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t=="function"}})});var Qn={exports:{}},ua,Cl;function ld(){if(Cl)return ua;Cl=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=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),r=RegExp.prototype.test.bind(/^\d*$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),a=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),o=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);function l(C){let S="",j=0,R=0;for(R=0;R<C.length;R++)if(j=C[R].charCodeAt(0),j!==48){if(!(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102))return"";S+=C[R];break}for(R+=1;R<C.length;R++){if(j=C[R].charCodeAt(0),!(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102))return"";S+=C[R]}return S}const c=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),u=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),d=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),h=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),m=RegExp.prototype.test.bind(/[^\d!"$&'()*+,\-.;=_`a-z{}~]/u),g=RegExp.prototype.test.bind(/(?:^|\.)\d+$/u);function b(C){return m(C)||g(C)}function v(C){if(C.length===0)return!1;for(let S=0;S<C.length;S++)if(!d(C[S])){if(C[S]==="%"&&S+2<C.length&&n(C.slice(S+1,S+3))){S+=2;continue}return!1}return!0}function y(C){let S=-1,j=0,R=-1,D=0;for(let W=0;W<C.length;W++)C[W]==="0"?(R===-1&&(R=W),D++,D>j&&(j=D,S=R)):(R=-1,D=0);if(j<2)return C.join(":");const H=C.slice(0,S).join(":"),T=C.slice(S+j).join(":");return H+"::"+T}function f(C){const S=C.indexOf("::");if(S!==-1&&C.indexOf("::",S+1)!==-1)return;const j=S===-1?C.split(":"):C.slice(0,S).split(":"),R=S===-1?[]:C.slice(S+2).split(":");S!==-1&&(j.length===1&&j[0]===""&&(j.length=0),R.length===1&&R[0]===""&&(R.length=0));const D=j.concat(R);let H=0;for(let W=0;W<D.length;W++){const F=D[W];if(F==="")return;if(F.indexOf(".")!==-1){if(W!==D.length-1||S!==-1&&R.length===0||!t(F))return;H+=2;continue}if(!c(F))return;D[W]=parseInt(F,16).toString(16),H++}if(S===-1)return H!==8?void 0:y(D);if(H>=8)return;const T=D.slice(0,j.length);for(let W=H;W<8;W++)T.push("0");for(let W=j.length;W<D.length;W++)T.push(D[W]);return y(T)}function A(C){const S=C[0]==="["&&C[C.length-1]==="]";if((C[0]==="["||C[C.length-1]==="]")&&!S)return{host:C,isIPV6:!1,error:!0};let R=S?C.slice(1,-1):C;if(S&&u(R))return R=R.toLowerCase(),{host:`[${R}]`,escapedHost:R,isIPV6:!1,isIPVFuture:!0};if(O(R,":")<2)return{host:C,isIPV6:!1,error:S};let D="";const H=R.indexOf("%");if(H!==-1){const W=R.slice(H,H+3).toLowerCase()==="%25"?3:1;if(D=R.slice(H+W),!v(D))return{host:C,isIPV6:!1,error:!0};R=R.slice(0,H)}const T=f(R);return T===void 0?{host:C,isIPV6:!1,error:!0}:{host:T+(D?"%"+D:""),escapedHost:T+(D?"%25"+D:""),isIPV6:!0}}function O(C,S){let j=0;for(let R=0;R<C.length;R++)C[R]===S&&j++;return j}function p(C){let S=C;const j=[];let R=-1,D=0;for(;D=S.length;){if(D===1){if(S===".")break;if(S==="/"){j.push("/");break}else{j.push(S);break}}else if(D===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){j.push("/");break}}else if(D===3&&S==="/.."){j.length!==0&&j.pop(),j.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),j.length!==0&&j.pop();continue}}if((R=S.indexOf("/",1))===-1){j.push(S);break}else j.push(S.slice(0,R)),S=S.slice(R)}return j.join("")}const x={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},$=/[@/?#:]/g,k=/[@/?#]/g;function N(C,S){const j=S?k:$;return j.lastIndex=0,C.replace(j,R=>x[R])}function I(C,S=!1){if(C.indexOf("%")===-1)return C;let j="";for(let R=0;R<C.length;R++){if(C[R]==="%"&&R+2<C.length){const D=C.slice(R+1,R+3);if(n(D)){const H=D.toUpperCase(),T=String.fromCharCode(parseInt(H,16));S&&i(T)?j+=T:j+="%"+H,R+=2;continue}}j+=C[R]}return j}const U=new Array(256);{const C="0123456789ABCDEF";for(let S=0;S<256;S++)U[S]="%"+C[S>>4]+C[S&15]}function q(C){return C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||C===42||C===43||C===45||C===46||C===47||C===64||C===95}function M(C){return C<2048?U[192|C>>6]+U[128|C&63]:C<65536?U[224|C>>12]+U[128|C>>6&63]+U[128|C&63]:U[240|C>>18]+U[128|C>>12&63]+U[128|C>>6&63]+U[128|C&63]}function L(C){let S="";for(let j=0;j<C.length;j++){const R=C[j];if(R==="%"&&j+2<C.length){const D=C.slice(j+1,j+3);if(n(D)){const H=D.toUpperCase(),T=String.fromCharCode(parseInt(H,16));T!=="."&&i(T)?S+=T:S+="%"+H,j+=2;continue}}if(s(R))S+=R;else{const D=C.charCodeAt(j);if(D<128)S+=q(D)?R:U[D];else if(D<55296||D>57343)S+=M(D);else if(D<=56319&&j+1<C.length){const H=C.charCodeAt(j+1);H>=56320&&H<=57343?(S+=M(65536+(D-55296<<10)+(H-56320)),j++):S+=M(65533)}else S+=M(65533)}}return S}function K(C,S=!1){let j="",R=S&&C[0]!=="/";for(let D=0;D<C.length;D++){const H=C[D];if(H==="%"&&D+2<C.length){const T=C.slice(D+1,D+3);if(n(T)){j+="%"+T.toUpperCase(),D+=2;continue}}if(H==="/"&&(R=!1),s(H)&&(H!==":"||!R))j+=H;else{const T=C.charCodeAt(D);if(T<128)j+=U[T];else if(T<55296||T>57343)j+=M(T);else if(T<=56319&&D+1<C.length){const W=C.charCodeAt(D+1);W>=56320&&W<=57343?(j+=M(65536+(T-55296<<10)+(W-56320)),D++):j+=M(65533)}else j+=M(65533)}}return j}function B(C){let S="";for(let j=0;j<C.length;j++){const R=C[j];if(R==="%"&&j+2<C.length){const D=C.slice(j+1,j+3);if(n(D)){const H=D.toUpperCase(),T=String.fromCharCode(parseInt(H,16));i(T)?S+=T:S+="%"+H,j+=2;continue}}if(a(R))S+=R;else{const D=C.charCodeAt(j);if(D<128)S+=q(D)?R:U[D];else if(D<55296||D>57343)S+=M(D);else if(D<=56319&&j+1<C.length){const H=C.charCodeAt(j+1);H>=56320&&H<=57343?(S+=M(65536+(D-55296<<10)+(H-56320)),j++):S+=M(65533)}else S+=M(65533)}}return S}function Q(C,S){let j="";for(let R=0;R<C.length;R++){const D=C[R];if(D==="%"&&R+2<C.length){const H=C.slice(R+1,R+3);if(n(H)){j+="%"+H.toUpperCase(),R+=2;continue}}if(S(D))j+=D;else{const H=C.charCodeAt(R);if(H<128)j+=U[H];else if(H<55296||H>57343)j+=M(H);else if(H<=56319&&R+1<C.length){const T=C.charCodeAt(R+1);T>=56320&&T<=57343?(j+=M(65536+(H-55296<<10)+(T-56320)),R++):j+=M(65533)}else j+=M(65533)}}return j}function X(C){return Q(C,o)}function re(C){return Q(C,a)}function E(C){return Q(C,a)}function _(C){let S="";for(let j=0;j<C.length;j++){const R=C[j];if(R==="%"&&j+2<C.length){const H=C.slice(j+1,j+3);if(n(H)){S+="%"+H.toUpperCase(),j+=2;continue}}const D=C.charCodeAt(j);if(D<128)S+=q(D)?R:U[D];else if(D<55296||D>57343)S+=M(D);else if(D<=56319&&j+1<C.length){const H=C.charCodeAt(j+1);H>=56320&&H<=57343?(S+=M(65536+(D-55296<<10)+(H-56320)),j++):S+=M(65533)}else S+=M(65533)}return S}function P(C){const S=[];if(C.userinfo!==void 0&&(S.push(X(C.userinfo)),S.push("@")),C.host!==void 0){let j=C.host;if(!t(j)){let R=A(j);R.isIPV6!==!0&&R.isIPVFuture!==!0&&(j=I(j,!0),R=A(j)),R.isIPV6===!0||R.isIPVFuture===!0?j=`[${R.escapedHost}]`:j=N(j,!1)}S.push(j)}if(typeof C.port=="number"||typeof C.port=="string"){const j=String(C.port);if(!r(j))throw new TypeError("URI port is malformed.");S.push(":"),S.push(j)}return S.length?S.join(""):void 0}return ua={BYTE_HEX:U,percentEncodeNonAscii:M,nonSimpleDomain:h,nonSimpleMailtoDomain:b,recomposeAuthority:P,reescapeHostDelimiters:N,normalizePercentEncoding:I,normalizePathEncoding:L,serializePathEncoding:K,normalizeQueryFragmentEncoding:B,encodeUserinfo:X,encodeQuery:re,encodeFragment:E,escapePreservingEscapes:_,removeDotSegments:p,isIPv4:t,isUUID:e,normalizeIPv6:A,stringArrayToHexStripped:l},ua}var da,Al;function $m(){if(Al)return da;Al=1;const{isUUID:e,BYTE_HEX:t,percentEncodeNonAscii:r,nonSimpleMailtoDomain:n}=ld(),i=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,s=["http","https","ws","wss","urn","urn:uuid","mailto"];function a(T){return s.indexOf(T)!==-1}function o(T){return T.secure===!0?!0:T.secure===!1?!1:T.scheme?T.scheme.length===3&&(T.scheme[0]==="w"||T.scheme[0]==="W")&&(T.scheme[1]==="s"||T.scheme[1]==="S")&&(T.scheme[2]==="s"||T.scheme[2]==="S"):!1}function l(T){return T.host||(T.error=T.error||"HTTP URIs must have a host."),T}function c(T){const W=String(T.scheme).toLowerCase()==="https";return(T.port===(W?443:80)||T.port==="")&&(T.port=void 0),T.path||(T.path="/"),T}function u(T){return T.secure=o(T),T.resourceName=(T.path||"/")+(T.query?"?"+T.query:""),T.path=void 0,T.query=void 0,T}function d(T){if((T.port===(o(T)?443:80)||T.port==="")&&(T.port=void 0),typeof T.secure=="boolean"&&(T.scheme=T.secure?"wss":"ws",T.secure=void 0),T.resourceName){const W=T.resourceName.indexOf("?"),F=W===-1?T.resourceName:T.resourceName.slice(0,W);T.path=F&&F!=="/"?F:void 0,T.query=W===-1?void 0:T.resourceName.slice(W+1),T.resourceName=void 0}return T.fragment=void 0,T}function h(T,W){if(!T.path)return T.error="URN can not be parsed",T;const F=T.path.match(i);if(F&&F[0]===T.path){const V=W.scheme||T.scheme||"urn";T.nid=F[1].toLowerCase(),T.nss=F[2];const z=`${V}:${W.nid||T.nid}`,J=H(z);T.path=void 0,J&&(T=J.parse(T,W))}else T.error=T.error||"URN can not be parsed.";return T}function m(T,W){if(T.nid===void 0)throw new Error("URN without nid cannot be serialized");const F=W.scheme||T.scheme||"urn",V=T.nid.toLowerCase(),z=`${F}:${W.nid||V}`,J=H(z);J&&(T=J.serialize(T,W));const Y=T,Z=T.nss;return Y.path=`${V||W.nid}:${Z}`,W.skipEscape=!0,Y}function g(T,W){const F=T;return F.uuid=F.nss,F.nss=void 0,!W.tolerant&&(!F.uuid||!e(F.uuid))&&(F.error=F.error||"UUID is not valid."),F}function b(T){const W=T;return W.nss=(T.uuid||"").toLowerCase(),W}const v={scheme:"http",domainHost:!0,parse:l,serialize:c},y={scheme:"https",domainHost:v.domainHost,parse:l,serialize:c},f={scheme:"ws",domainHost:!0,parse:u,serialize:d},A={scheme:"wss",domainHost:f.domainHost,parse:f.parse,serialize:f.serialize},O={scheme:"urn",parse:h,serialize:m,skipNormalize:!0},p={scheme:"urn:uuid",parse:g,serialize:b,skipNormalize:!0},x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+=",$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+,;:@",k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+;:";function N(T,W=!1){const F=new Uint8Array(128);for(let J=0;J<T.length;J++)F[T.charCodeAt(J)]=1;const V=T.replace(/[\\\]^-]/gu,"\\$&"),z=W?`[${V}]|[^\\0-\\x7F\\uD800-\\uDFFF]`:`[${V}]`;return{all:new RegExp(`^(?:${z})*$`,"u"),table:F,allowNonAscii:W}}const I=N(x),U=N($),q=N(k),M=N(k,!0),L=/^[\da-f]{2}$/iu,K=/^\[[\x21-\x5A\x5E-\x7E]*\]$/u,B="URI mailto has an invalid recipient domain.",Q=/[\uD800-\uDFFF]/u;function X(T){if(typeof T!="string"||T.indexOf("%")===-1)return T;try{return decodeURIComponent(T)}catch{return T}}function re(T){let W="";for(let F=0;F<T.length;F++){const V=T.charCodeAt(F);if(V>=55296&&V<=56319&&F+1<T.length){const z=T.charCodeAt(F+1);if(z>=56320&&z<=57343){W+=T[F]+T[F+1],F++;continue}}W+=V>=55296&&V<=57343?"�":T[F]}return W}function E(T,W){if(W.all.test(T))return T;const F=W.table;let V="";for(let z=0;z<T.length;z++){const J=T.charCodeAt(z);if(J<128){F[J]===1?V+=T[z]:J===37&&z+2<T.length&&L.test(T.slice(z+1,z+3))?(V+="%"+T.slice(z+1,z+3).toUpperCase(),z+=2):V+=t[J];continue}if(J<55296||J>57343){V+=W.allowNonAscii?T[z]:r(J);continue}if(J<=56319&&z+1<T.length){const Y=T.charCodeAt(z+1);if(Y>=56320&&Y<=57343){V+=W.allowNonAscii?T[z]+T[z+1]:r(65536+(J-55296<<10)+(Y-56320)),z++;continue}}V+=W.allowNonAscii?"�":r(65533)}return V}function _(T,W,F){const V=String(T).toLowerCase();if(K.test(V)||V!==""&&!n(V))return V;try{const z=new URL("http://"+V);if(z.username||z.password||z.port||z.pathname!=="/"||z.search||z.hash||!z.hostname)throw new Error(B);return W&&W.unicodeSupport?V:z.hostname}catch{return F&&(F.error=F.error||B),V}}function P(T,W){const F=W&&W.unicodeSupport?M:q;return T.length>1&&T[0]==="["&&T[T.length-1]==="]"?"["+E(T.slice(1,-1),F)+"]":E(T,F)}function C(T,W){const F=T;let V=F.path,z=F.query;V&&Q.test(V)&&(V=re(V)),z&&Q.test(z)&&(z=re(z));const J=V?V.indexOf(",")===-1?[V]:V.split(","):[];if(F.path=void 0,z){let Y=null,Z=0;for(;Z<=z.length;){let te=z.indexOf("&",Z);te===-1&&(te=z.length);const ie=z.slice(Z,te);Z=te+1;const ae=ie.indexOf("=");if(ae!==ie.lastIndexOf("=")){F.error=F.error||"URI mailto has malformed header fields.";continue}const de=X(ae===-1?ie:ie.slice(0,ae)),ge=de.toLowerCase(),ue=ae===-1?"":ie.slice(ae+1);if(ge==="to"){const Ce=ue.split(",");for(let Pe=0;Pe<Ce.length;Pe++)J.push(Ce[Pe]);continue}if(ge==="subject"){F.subject=X(ue);continue}if(ge==="body"){F.body=X(ue);continue}Y===null&&(Y=Object.create(null)),Y[de]=X(ue)}Y!==null&&(F.headers=Y)}F.query=void 0;for(let Y=0;Y<J.length;Y++){const Z=J[Y],te=Z.lastIndexOf("@");if(te<0){F.error=F.error||B,J[Y]=X(Z);continue}const ie=X(Z.slice(0,te)),ae=_(X(Z.slice(te+1)),W,F);J[Y]=ie+"@"+ae}return J.length&&(F.to=J),F}function S(T){return E(T.replace(/%/gu,"%25"),U)}function j(T,W){const F=T,V=Array.isArray(F.to)?F.to.slice():[],z=F.headers&&typeof F.headers=="object"?Object.assign(Object.create(null),F.headers):Object.create(null),J=Object.create(null);for(const te in z){const ie=te.toLowerCase();if(ie==="to"){const ae=String(z[te]).split(",");for(let de=0;de<ae.length;de++)V.push(ae[de])}else ie==="subject"||ie==="body"?J[ie]=z[te]:J[te]=z[te]}if(F.subject!==void 0&&(J.subject=F.subject),F.body!==void 0&&(J.body=F.body),F.headers=J,V.length){for(let te=0;te<V.length;te++){const ie=String(V[te]),ae=ie.lastIndexOf("@"),de=ae>=0?ie.slice(0,ae):ie,ge=ae>=0?ie.slice(ae+1):"",ue=E(de,I),Ce=X(ge),Pe=_(Ce,W);V[te]=ue+"@"+P(Pe,W)}F.path=V.join(","),W.skipEscape=!0}else F.path=void 0;let Y="",Z=0;for(const te in J)Z++!==0&&(Y+="&"),Y+=S(te)+"="+E(String(J[te]),U);return Z!==0?F.query=Y:F.headers=void 0,F}const D={http:v,https:y,ws:f,wss:A,urn:O,"urn:uuid":p,mailto:{scheme:"mailto",parse:C,serialize:j,domainHost:!1,unicodeSupport:!0,skipNormalize:!0,absolutePath:!0}};Object.setPrototypeOf(D,null);function H(T){return T&&(D[T]||D[T.toLowerCase()])||void 0}return da={wsIsSecure:o,SCHEMES:D,isValidSchemeName:a,getSchemeHandler:H},da}var wl;function _m(){if(wl)return Qn.exports;wl=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizePercentEncoding:n,normalizePathEncoding:i,serializePathEncoding:s,normalizeQueryFragmentEncoding:a,encodeQuery:o,encodeFragment:l,reescapeHostDelimiters:c,isIPv4:u,nonSimpleDomain:d}=ld(),{SCHEMES:h,getSchemeHandler:m}=$m(),g=/^[A-Za-z][A-Za-z0-9+.-]*$/u,b="URI scheme is malformed.";function v(E){const _=unescape(String(E));if(!g.test(_))throw new TypeError(b);return _}function y(E,_){return typeof E=="string"?E=B(E,_):typeof E=="object"&&(E=K(p(E,_),_)),E}function f(E,_,P){const C=P?Object.assign({scheme:"null"},P):{scheme:"null"},{parsed:S,malformedAuthorityOrPort:j,malformedPercentEncoding:R,malformedSchemeSpecific:D,malformedHost:H,malformedScheme:T}=L(E,C),{parsed:W,malformedAuthorityOrPort:F,malformedPercentEncoding:V,malformedSchemeSpecific:z,malformedHost:J,malformedScheme:Y}=L(_,C);if(j||F||R||V||D||z||H||J||T||Y)throw new Error(S.error||W.error||"URI is malformed.");const Z=A(S,W,C,!0),te=m(P&&P.scheme||Z.scheme),ie=Z.host,ae=ie!==void 0&&ie!==""&&(u(ie)||e(ie).isIPV6);M(Z,P||{},te,ae);const de=ie&&ie.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(ie);if(Z.error&&!de)throw new Error(Z.error);return C.skipEscape=!0,p(Z,C)}function A(E,_,P,C){const S={};return C||(E=K(p(E,P),P),_=K(p(_,P),P)),P=P||{},!P.tolerant&&_.scheme?(S.scheme=_.scheme,S.userinfo=_.userinfo,S.host=_.host,S.port=_.port,S.path=t(_.path||""),S.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(S.userinfo=_.userinfo,S.host=_.host,S.port=_.port,S.path=t(_.path||""),S.query=_.query):(_.path?(_.path[0]==="/"?S.path=t(_.path):((E.userinfo!==void 0||E.host!==void 0||E.port!==void 0)&&!E.path?S.path="/"+_.path:E.path?S.path=E.path.slice(0,E.path.lastIndexOf("/")+1)+_.path:S.path=_.path,S.path=t(S.path)),S.query=_.query):(S.path=E.path,_.query!==void 0?S.query=_.query:S.query=E.query),S.userinfo=E.userinfo,S.host=E.host,S.port=E.port),S.scheme=E.scheme),S.fragment=_.fragment,S}function O(E,_,P){const C=X(E,P),S=X(_,P);return C!==void 0&&S!==void 0&&C===S}function p(E,_){const P={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,to:E.to,subject:E.subject,body:E.body,headers:E.headers,error:""},C=Object.assign({},_),S=[];P.scheme&&(P.scheme=v(P.scheme));const j=m(C.scheme||P.scheme);j&&j.serialize&&j.serialize(P,C);const R=P.userinfo!==void 0||P.host!==void 0||P.port!==void 0,D=!C.skipEscape&&P.scheme===void 0&&!R;P.path!==void 0&&(C.skipEscape?P.path=n(P.path):P.path=s(P.path,D)),C.reference!=="suffix"&&P.scheme&&(P.scheme=v(P.scheme),S.push(P.scheme,":"));const H=r(P);if(H!==void 0&&(C.reference!=="suffix"&&S.push("//"),S.push(H),P.path&&P.path[0]!=="/"&&S.push("/")),P.path!==void 0){let T=P.path;!C.absolutePath&&(!j||!j.absolutePath)&&(T=t(T)),D&&(T=s(T,!0)),H===void 0&&T[0]==="/"&&T[1]==="/"&&(T="/%2F"+T.slice(2)),S.push(T)}return P.query!==void 0&&S.push("?",o(P.query)),P.fragment!==void 0&&S.push("#",l(P.fragment)),S.join("")}const x=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,$=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,k=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function N(E,_){if(_[2]!==void 0&&E.path&&E.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof E.port=="number"&&(E.port<0||E.port>65535))return"URI port is malformed."}function I(E){if(E===void 0)return!1;let _=E.indexOf("%");for(;_!==-1;){if(_+2>=E.length||!/^[\da-f]{2}$/iu.test(E.slice(_+1,_+3)))return!0;_=E.indexOf("%",_+3)}return!1}function U(E){return E[0]==="["&&E[E.length-1]==="]"}function q(E){const _=E[4];return I(E[3])||_!==void 0&&!U(_)&&I(_)||I(E[6])||I(E[7])||I(E[8])}function M(E,_,P,C){const S=E.host&&E.host[0]==="["&&E.host[E.host.length-1]==="]";if(!_.unicodeSupport&&(!P||!P.unicodeSupport)&&E.host&&!U(E.host)&&(_.domainHost||P&&P.domainHost)&&C===!1&&!S&&d(E.host))try{E.host=new URL("http://"+E.host).hostname}catch(j){return E.error=E.error||"Host's domain name can not be converted to ASCII: "+j,!0}return!1}function L(E,_){const P=Object.assign({},_),C={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let S=!1,j=!1,R=!1,D=!1,H=!1,T=!1,W=!1;P.reference==="suffix"&&(P.scheme?E=P.scheme+":"+E:E="//"+E);const F=E.match($);F!==null&&F[1].indexOf("\\")!==-1&&(C.error="URI authority must not contain a literal backslash.",S=!0);const V=E.match(k);if(V!==null){const J=V[1],Y=J.replace(/[\t\n\r]/g,"");Y.length>=2&&(Y.slice(0,2)!=="//"?(C.error=C.error||"URI authority must not contain a literal backslash.",S=!0):J.length!==Y.length&&(C.error=C.error||"URI authority introducer must not contain whitespace.",S=!0))}const z=E.match(x);if(z){if(C.scheme=z[1],C.userinfo=z[3],C.host=z[4],C.port=parseInt(z[5],10),C.path=z[6]||"",C.query=z[7],C.fragment=z[8],C.scheme!==void 0){const Z=unescape(C.scheme);g.test(Z)?C.scheme=Z.toLowerCase():(C.error=C.error||b,T=!0)}j=q(z),j&&(C.error=C.error||"URI contains malformed percent-encoding."),isNaN(C.port)&&(C.port=z[5]);const J=N(C,z);if(J!==void 0&&(C.error=C.error||J,S=!0),C.host)if(u(C.host)===!1){const te=U(C.host),ie=C.host.indexOf("[")!==-1||C.host.indexOf("]")!==-1,ae=e(C.host);W=ae.isIPV6||ae.isIPVFuture===!0,H=ie&&(!te||ae.error===!0),C.host=W?ae.host:ae.host.toLowerCase(),H&&(C.error=C.error||"URI host is malformed.",S=!0)}else W=!0;C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&C.query===void 0&&!C.path?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",P.reference&&P.reference!=="suffix"&&P.reference!==C.reference&&(C.error=C.error||"URI is not a "+P.reference+" reference.");const Y=m(P.scheme||C.scheme);if(H||(D=M(C,P,Y,W)),E.indexOf("%")!==-1&&C.host!==void 0&&!H){let Z=W?C.host:n(C.host,!0);W||(Z=n(Z.toLowerCase())),C.host=c(Z,W)}(!Y||Y&&!Y.skipNormalize)&&(C.path&&(C.path=i(C.path)),C.query&&(C.query=a(C.query)),C.fragment&&(C.fragment=a(C.fragment))),Y&&Y.parse&&(Y.parse(C,P),Y===h.urn&&C.nid===void 0&&(R=!0))}else C.error=C.error||"URI can not be parsed.";return{parsed:C,malformedAuthorityOrPort:S,malformedPercentEncoding:j,malformedSchemeSpecific:R,malformedHost:D,malformedScheme:T}}function K(E,_){return L(E,_).parsed}function B(E,_){return Q(E,_).normalized}function Q(E,_){const{parsed:P,malformedAuthorityOrPort:C,malformedPercentEncoding:S,malformedSchemeSpecific:j,malformedHost:R,malformedScheme:D}=L(E,_);return{normalized:C||S||j||R||D?E:p(P,_),malformedAuthorityOrPort:C,malformedPercentEncoding:S,malformedSchemeSpecific:j,malformedHost:R,malformedScheme:D}}function X(E,_){if(typeof E!="string"&&typeof E!="object")return;let P;try{P=typeof E=="string"?E:p(E,_)}catch{return}const{normalized:C,malformedAuthorityOrPort:S,malformedPercentEncoding:j,malformedSchemeSpecific:R,malformedHost:D,malformedScheme:H}=Q(P,_);return S||j||R||D||H?void 0:C}const re={SCHEMES:h,normalize:y,resolve:f,resolveComponent:A,equal:O,serialize:p,parse:K};return Qn.exports=re,Qn.exports.default=re,Qn.exports.fastUri=re,Qn.exports}var Em=_m();const $o=mi(Em);var Xn={},$l;function jm(){if($l)return Xn;$l=1;var e=/~/,t=/~[01]/g;function r(c){switch(c){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+c)}function n(c){return e.test(c)?c.replace(t,r):c}function i(c,u,d){for(var h,m,g=1,b=u.length;g<b;){if(u[g]==="constructor"||u[g]==="prototype"||u[g]==="__proto__")return c;if(h=n(u[g++]),m=b>g,typeof c[h]>"u"&&(Array.isArray(c)&&h==="-"&&(h=c.length),m&&(u[g]!==""&&u[g]<1/0||u[g]==="-"?c[h]=[]:c[h]={})),!m)break;c=c[h]}var v=c[h];return d===void 0?delete c[h]:c[h]=d,v}function s(c){if(typeof c=="string"){if(c=c.split("/"),c[0]==="")return c;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(c)){for(const u of c)if(typeof u!="string"&&typeof u!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return c}throw new Error("Invalid JSON pointer.")}function a(c,u){if(typeof c!="object")throw new Error("Invalid input object.");u=s(u);var d=u.length;if(d===1)return c;for(var h=1;h<d;){if(c=c[n(u[h++])],d===h)return c;if(typeof c!="object"||c===null)return}}function o(c,u,d){if(typeof c!="object")throw new Error("Invalid input object.");if(u=s(u),u.length===0)throw new Error("Invalid JSON pointer for set.");return i(c,u,d)}function l(c){var u=s(c);return{get:function(d){return a(d,u)},set:function(d,h){return o(d,u,h)}}}return Xn.get=a,Xn.set=o,Xn.compile=l,Xn}var Om=jm();const fa=mi(Om);function js(e,t){if(Te in e&&$o.equal(e[Te],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const n of r)if(le(n)){const i=js(n,t);if(i!==void 0)return i}}else if(le(r)){const n=js(r,t);if(n!==void 0)return n}}function Ya(e,t){const r=e[Te]??t;let n=e;Ke in n&&(n={...n,[Ke]:$o.resolve(r,n[Ke])});for(const[i,s]of Object.entries(n))Array.isArray(s)?n={...n,[i]:s.map(a=>le(a)?Ya(a,r):a)}:le(s)&&(n={...n,[i]:Ya(s,r)});return n}function _o(e,t){const{[e]:r,...n}=t;return[n,r]}function cd(e,t={},r=[],n=t[Te]){const i=e||"";let s,a=n;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));a===void 0||Te in t&&t[Te]===a?s=fa.get(t,l):t[ni]===ys&&(s=js(t,a.replace(/\/$/,"")),s!==void 0&&(s=fa.get(s,l)))}else if(t[ni]===ys){const l=a?$o.resolve(a,i):i,[c,...u]=l.replace(/#\/?$/,"").split("#");s=js(t,c.replace(/\/$/,"")),s!==void 0&&(a=s[Te],u.length>0&&(s=fa.get(s,decodeURIComponent(u.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const o=s[Ke];if(o){if(r.includes(o)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[d,...h]=r,m=[...h,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${m}`)}const[l,c]=_o(Ke,s),u=cd(c,t,[...r,i],a);return Object.keys(l).length>0?t[ni]===tm||t[ni]===ys?{[or]:[l,u]}:{...l,...u}:u}return s}function Mn(e,t={},r=t[Te]){return cd(e,t,[],r)}const km=/^(?:0|[1-9]\d*)$/;function Zt(e){return e.split(/[.[\]]+/).filter(Boolean)}function Pm(e){return Array.isArray(e)?e:[e]}function _l(e){return e==="__proto__"}function Nm(e){return typeof e=="number"?Number.isInteger(e)&&e>=0:km.test(e)}function an(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function he(e,t,r){let n;if(!Array.isArray(t))n=an(e)&&Object.hasOwn(e,t)?e[t]:void 0;else if(t.length===0)n=void 0;else{n=e;for(let i=0;i<t.length;i++){const s=t[i];if(!an(n)||!Object.hasOwn(n,s)){n=void 0;break}n=n[s]}}return n===void 0?r:n}function rt(e,t,r,n=!1){if(!an(e))return e;if(!Array.isArray(t)){if(!_l(t)){const a=e;a[t]=r}return e}const i=t;if(i.some(_l))return e;let s=e;for(let a=0;a<i.length;a++){const o=i[a];if(a===i.length-1)s[o]=r;else{const l=Object.hasOwn(s,o)?s[o]:void 0;if(an(l))s=l;else{const c=n||!Nm(i[a+1])?{}:[];s[o]=c,an(c)&&(s=c)}}}return e}function bt(e,t){if(!Array.isArray(t))return an(e)&&Object.hasOwn(e,t);let r=e;for(let n=0;n<t.length;n++){if(!an(r)||!Object.hasOwn(r,t[n]))return!1;r=r[t[n]]}return t.length>0}function Fm(e,t){const r=Pm(t);if(r.length===0)return!0;const n=r.length>1?he(e,r.slice(0,-1)):e;if(n==null)return!0;try{return Reflect.deleteProperty(n,r[r.length-1])}catch{return!1}}function Kt(e){let t;const r=he(e,Zh);return typeof r=="string"?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function ui(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?"number":typeof e=="object"?"object":"string"}function It(e){let{type:t}=e;return!t&&e.const?ui(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function gr(e,t){const r={...e},n=Object.keys(t).reduce((i,s)=>{const a=e?e[s]:{},o=t[s];return e&&s in e&&le(o)?i[s]=gr(a,o):e&&t&&(It(e)==="object"||It(t)==="object")&&s===rd&&Array.isArray(a)&&Array.isArray(o)?i[s]=[...new Set([...a,...o])]:i[s]=o,i},r);for(const i of Object.getOwnPropertySymbols(t))n[i]=t[i];return n}function lr(e,t){return e?.[Qe]?.[t]??{}}function ud(e,t,r){if(e&&r){const n=he(e,r);if(n===void 0)return;for(let i=0;i<t.length;i+=1){const s=t[i],a=lr(s,r);if(a.type!=="object"&&a.type!=="array"&&(a.const===n||a.enum?.includes(n)))return i}}}function Os(e,t,r,n,i){if(t===void 0)return 0;const s=ud(t,r,i);if(typeof s=="number")return s;for(let a=0;a<r.length;a+=1){const o=r[a],l=i?o[Qe]?.[i]:void 0;if(i&&l!==void 0){const c=he(t,i);if(e.isValid(l,c,n))return a}else if(o[Qe]){const c={anyOf:Object.keys(o[Qe]).map(d=>({required:[d]}))};let u;if(o.anyOf){const{...d}=o;d.allOf?d.allOf=d.allOf.slice():d.allOf=[],d.allOf.push(c),u=d}else u={...o,...c};if(delete u.required,e.isValid(u,t,n))return a}else if(e.isValid(o,t,n))return a}return 0}const Im=Object.prototype;function ii(e){for(const t in e)if(Im.hasOwnProperty.call(e,t))return!1;return!0}const Rm=["array","boolean","integer","null","number","object","string"];new Set(Rm);const Dm=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Dm);const Tm=["items","allOf","oneOf","anyOf"];new Set(Tm);const Mm=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Mm);function gs(e){return typeof e=="object"}function Tt(e){return gs(e)?ii(e):e===!0}function Pn(e,t){return e<t?-1:e>t?1:0}function ha(e,t){const r=e.length;if(r===0)return t;let n=t.length;if(n===0)return e;if(r<n){const s=e;e=t,t=s,n=r}const i=new Set(e);for(let s=0;s<n;s++)i.add(t[s]);return Array.from(i)}function Um(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const i=e;e=t,t=i}const n=new Set(t);for(let i=0;i<e.length&&n.size>0;i++){const s=e[i];n.delete(s)&&r.push(s)}return r}function El(e){return e.length===0}function ma(e){return(t,r)=>{const n=t.length-r.length;if(n!==0)return n;for(let i=0;i<t.length;i++)if(t[i]!==r[i]){const s=e(t[i],r[i]);if(s!==0)return s}return 0}}function dd(e,{threshold:t=12}={}){return r=>{const n=r.length;if(n===0)return r;if(n<=t){const a=[];let o=0;e:for(let l=0;l<n;l++){const c=r[l];for(let u=0;u<o;u++)if(e(c,a[u])===0)continue e;o=a.push(c)}return a}const i=r.slice().sort(e);let s=0;for(let a=1;a<n;a++)e(i[s],i[a])!==0&&++s!==a&&(i[s]=i[a]);return i.length=s+1,i}}function qm(e){return(t,r)=>{const n=[];let i=t.length,s=r.length;if(i===0||s===0)return n;if(i>s){const u=t;t=r,r=u;const d=i;i=s,s=d}const a=[...t].sort(e),o=[...r].sort(e);let l=0,c=0;for(;l<i&&c<s;){const u=e(a[l],o[c]);u===0?((n.length===0||e(n[n.length-1],a[l])!==0)&&n.push(a[l]),l++,c++):u<0?l++:c++}return n}}function Lm(e,t){return r=>{if(e.has(r))return e.get(r);const n=t(r);return e.set(r,n),n}}const jl=Lm,fd=()=>0,Vm=e=>e===void 0,zm=e=>typeof e!="object",Ol={boolean:0,number:1,string:2};function Bm(e,t){const r=typeof e,n=typeof t;return r===n?Pn(e,t):Ol[r]-Ol[n]}function Km(e,t){const r=e.length;if(r===0)return t;const n=t.length;if(n===0)return e;if(n>r){const a=e;e=t,t=a}const i=new Set(e),s=t.length;for(let a=0;a<s;a++){const o=t[a];i.has(o)||e.push(o)}return e}function qs(e,t,r=fd){return(n,i)=>e(n)?e(i)?r(n,i):-1:e(i)?1:t(n,i)}function On(e){return qs(Vm,e)}function _r(e,t){return qs(r=>r===void 0||e(r),t)}function pa(e,t){return qs(Array.isArray,e,t)}const at=On(Pn),ya=_r(e=>e===0,(e,t)=>e-t);function Hm({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=jl(t,b=>Object.keys(b).sort());function n(b){return(v,y)=>{const f=r(v),A=r(y),O=Math.min(f.length,A.length);for(let p=0;p<O;p++){const x=Pn(f[p],A[p]);if(x!==0)return x}if(f.length!==A.length)return f.length-A.length;for(let p=0;p<O;p++){const x=f[p],$=b(v[x],y[x]);if($!==0)return $}return 0}}function i(b){const v=ma(b),y=jl(e,dd(b,{threshold:0}));return(f,A)=>v(y(f),y(A))}const s=i(Pn);function a(b,v){if(gs(b)){if(gs(v)){const y=Object.keys(b),f=Object.keys(v),A=Km(y,f),O=A.length;for(let p=0;p<O;p++){const x=A[p];if(b[x]===v[x])continue;const k=(g[x]??o)(b[x],v[x]);if(k!==0)return k}return 0}return v===!0&&ii(b)?0:1}return gs(v)?b===!0&&ii(v)?0:-1:Pn(b,v)}const o=On(c),l=qs(zm,pa(n(o),ma(c)),Bm);function c(b,v){return b===null?-1:v===null?1:l(b,v)}const u=On(a),d=_r(ii,n(u)),h=On(i(a)),m=_r(Tt,a),g={$id:at,$comment:at,$defs:d,$ref:at,$schema:at,const:o,contains:u,contentEncoding:at,contentMediaType:at,default:o,definitions:d,description:at,else:u,examples:o,exclusiveMaximum:at,exclusiveMinimum:at,format:at,if:u,maximum:at,maxItems:at,maxLength:at,maxProperties:at,minimum:at,multipleOf:at,not:u,pattern:at,propertyNames:u,readOnly:at,then:u,title:at,writeOnly:at,uniqueItems:_r(b=>b===!1,fd),minLength:ya,minItems:ya,minProperties:ya,required:_r(El,s),enum:_r(El,i(c)),type:On((b,v)=>{const y=Array.isArray(b),f=Array.isArray(v);return!y&&!f?Pn(b,v):s(y?b:[b],f?v:[v])}),items:_r(b=>!Array.isArray(b)&&Tt(b),pa(a,ma(a))),anyOf:h,allOf:h,oneOf:h,properties:d,patternProperties:d,additionalProperties:m,additionalItems:m,dependencies:_r(ii,n(On(pa(a,s))))};return{compareSchemaValues:c,compareSchemaDefinitions:a}}function kl(e){return e}const hd=(e,t)=>e?hd(t%e,e):t,Wm=(e,t)=>Math.abs(e*t)/hd(e,t);function Gm(e,t){return e===t?e:`(?=.*(?:${e}))(?=.*(?:${t}))`}function ga(e,t,r){const n=e.length,i=t.length;if(n>0&&i>0)for(let s=0;s<n;s++){const a=e[s];for(let o=0;o<i;o++)r(a,t[o])}}function va(e,t){return e||t}function Pl(e){return(t,r)=>{const n={...t},i=Object.keys(r),s=i.length;for(let a=0;a<s;a++){const o=i[a];n[o]=t[o]===void 0?r[o]:e(t[o],r[o])}return n}}function Jm(e){const t=new Map;for(const r of e)for(const n of r[0])t.set(n,r[1]);return t}function Gr(e,t,r){r===void 0||Tt(r)?delete e[t]:e[t]=r}const Ym=["properties","patternProperties","additionalProperties"];function Nl(e){const t=Object.keys(e),r=t.length,n=[];for(let i=0;i<r;i++){const s=t[i];n.push({regExp:new RegExp(s),schema:e[s]})}return[n,t]}const Fl=[[],[]];function Il(e,t,r){const n=r.length;for(let i=0;i<n;i++){const s=r[i];if(!s.regExp.test(t))continue;const a=s.schema;if(a===!1)return!0;e.push(a)}return!1}const Zm=["items","additionalItems"],Qm=["if","then","else"],Xm=["contains"];function Rl(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 ba(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 Jr(e,t,r){return[e,t,r]}function ep(e){const t=new Map;for(const[r,n,i]of e){const s=a=>{if(!i(a))throw new Error(`Schema keys '${r}' and '${n}' are conflicting (${r}: ${JSON.stringify(a[r])}, ${n}: ${JSON.stringify(a[n])})`)};for(const a of[[r,n],[n,r]]){let o=t.get(a[0]);o===void 0&&(o=[],t.set(a[0],o)),o.push({oppositeKey:a[1],check:s})}}return t}const tp=[Jr("minimum","maximum",e=>e.maximum>=e.minimum),Jr("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Jr("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Jr("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Jr("minLength","maxLength",e=>e.maxLength>=e.minLength),Jr("minItems","maxItems",e=>e.maxItems>=e.minItems),Jr("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function rp({mergePatterns:e=Gm,isSubRegExp:t=Object.is,intersectJson:r=Um,deduplicateJsonSchemaDef:n=kl,defaultMerger:i=kl,assigners:s=[],checks:a=tp,mergers:o}={}){function l(p){const x=p.length;let $=p[0];for(let k=1;k<x;k++){const N=f($,p[k]);if(N===!1)return!1;Tt(N)||($=N)}return $}function c(p,x,$,k,N,I,U){if(p.length=0,$===!1)return!1;if(p.push($),N!==void 0){if(N===!1)return!1;p.push(N)}if(Il(p,x,I))return!1;const M=p.length<2;if(U===!1){if(M)return;if(Il(p,x,k))return!1}else M&&U!==void 0&&p.push(U);return p.length===1?p[0]:l(p)}function u(p,x,$,k,N,I){const U=$.length;if(U>0&&N!==!1)if(I)Object.assign(p,x);else for(let q=0;q<U;q++){const M=$[q];k.has(M)||(p[M]=f(x[M],N))}return p}const d=(p,{properties:x={},patternProperties:$,additionalProperties:k=!0},{properties:N={},patternProperties:I,additionalProperties:U=!0})=>{const q=Tt(k),M=Tt(U);if(q&&M)return Gr(p,"properties",A(x,N)),Gr(p,"patternProperties",$&&I?A($,I):$??I),delete p.additionalProperties,p;const L=f(k,U);Gr(p,"additionalProperties",L);const K={},B=Object.keys(x),Q=B.length,[X,re]=$?Nl($):Fl,[E,_]=I?Nl(I):Fl,P=[],C=new Set,S=M?void 0:U;for(let W=0;W<Q;W++){const F=B[W];C.add(F);const V=c(P,F,x[F],X,N[F],E,S);V!==void 0&&(K[F]=V)}const j=Object.keys(N),R=j.length,D=q?void 0:k;for(let W=0;W<R;W++){const F=j[W];if(C.has(F))continue;const V=c(P,F,N[F],E,void 0,X,D);V!==void 0&&(K[F]=V)}Gr(p,"properties",K);let H={};const T=new Set;return re.length>0&&_.length>0&&ga(re,_,(W,F)=>{t(W,F)&&T.add(W),t(F,W)&&T.add(F),H[e(W,F)]=f($[W],I[F])}),H=u(H,$,re,T,U,M),H=u(H,I,_,T,k,q),Gr(p,"patternProperties",H),p},h=(p,{items:x=[],additionalItems:$},{items:k=[],additionalItems:N})=>{const I=Array.isArray(x),U=Array.isArray(k),q=[];if(p.items=q,I&&U){const[M,L,K]=x.length<k.length?[x.length,$,k]:[k.length,N,x];let B=0;for(;B<M;B++)q.push(f(x[B],k[B]));if(L===!1)p.additionalItems=!1;else{const Q=L===void 0||Tt(L);for(;B<K.length;B++)q.push(Q?K[B]:f(K[B],L));Gr(p,"additionalItems",$!==void 0&&N!==void 0?f($,N):$??N)}}else if(I||U){const[M,L,K]=I?[x,k,$]:[k,x,N];Gr(p,"additionalItems",K&&f(K,L));for(let B=0;B<M.length;B++)q.push(f(M[B],L))}else delete p.additionalItems,p.items=f(x,k);return p},m=(p,x,$)=>{Rl(p,x);const k=Rl({},$);return p.allOf===void 0?p.allOf=[k]:p.allOf=p.allOf.concat(k),p},g=(p,x,$)=>{const k=x.contains,N=$.contains;if(k===N)return p;if(k===!1||N===!1)return p.contains=!1,p;if(Tt(k))return p.contains=N,p;if(Tt(N))return p.contains=k,p;if(n([k,N]).length===1)return p;const I={contains:N};return p.allOf=p.allOf===void 0?[I]:n(p.allOf.concat(I)),p};function b(p,x){const $=[];if(ga(p,x,(k,N)=>{try{$.push(f(k,N))}catch{}}),$.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(p)}" and "${JSON.stringify(x)}"; the merged result is empty`);return n($)}const v=Jm([[Ym,d],[Zm,h],[Qm,m],[Xm,g],...s]),y=ep(a);function f(p,x){if(p===!1||x===!1)return!1;if(Tt(p))return Tt(x)?!0:x;if(Tt(x))return p;let $={...p};const k=new Set,N=new Set,I=Reflect.ownKeys(x),U=I.length;for(let q=0;q<U;q++){const M=I[q],L=x[M];if(L===void 0)continue;const K=y.get(M);if(K!==void 0){const re=K.length;for(let E=0;E<re;E++){const _=K[E];p[_.oppositeKey]!==void 0&&N.add(_.check)}}const B=p[M];if(B===void 0){$[M]=L;continue}const Q=v.get(M);if(Q){k.add(Q);continue}const X=O[M]??i;$[M]=X(B,L)}for(const q of k)$=q($,p,x);for(const q of N)q($);return $}const A=Pl(f),O={$id:i,$ref:i,$schema:i,$comment:i,$defs:A,definitions:A,type:(p,x)=>{if(p===x)return p;const $=Array.isArray(p),k=Array.isArray(x);if(!$&&!k){const N=ba(p,x);if(N!==void 0)return N}else if($||k){const N=new Set;if($&&k)ga(p,x,(U,q)=>{const M=ba(U,q);M!==void 0&&N.add(M)});else{const U=$?p:x,q=$?x:p,M=U.length;for(let L=0;L<M;L++){const K=ba(q,U[L]);K!==void 0&&N.add(K)}}const I=N.size;if(I===1)return N.values().next().value;if(I>1)return Array.from(N)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${p.toString()}, ${x.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(p,x)=>{const $=n([p,x]);return $.length===1?$[0]:{anyOf:$}},pattern:e,readOnly:va,writeOnly:va,enum:(p,x)=>{const $=r(p,x);if($.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(p)}", "${JSON.stringify(x)}"`);return $},anyOf:b,oneOf:b,allOf:(p,x)=>n(p.concat(x)),propertyNames:f,dependencies:Pl((p,x)=>Array.isArray(p)?Array.isArray(x)?ha(p,x):f(x,{required:p}):Array.isArray(x)?f(p,{required:x}):f(p,x)),examples:(p,x)=>{if(!Array.isArray(p)||!Array.isArray(x))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(p)}" and "${JSON.stringify(x)}"`);return ha(p,x)},multipleOf:(p,x)=>{let $=1;for(;!Number.isInteger(p)||!Number.isInteger(x);)$*=10,p*=10,x*=10;return Wm(p,x)/$},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:va,required:ha,...o};return{mergeSchemaDefinitions:f,mergeArrayOfSchemaDefinitions:l}}function np(e){const t=[],r=[e];for(;r.length>0;){const n=r.pop();if(typeof n=="boolean"||n.allOf===void 0){t.push(n);continue}const{allOf:i,...s}=n;t.push(s);for(let a=i.length-1;a>=0;a--)r.push(i[a])}return t}function ip(e){return t=>e(np(t))}const{compareSchemaDefinitions:sp,compareSchemaValues:ap}=Hm(),{mergeArrayOfSchemaDefinitions:op}=rp({intersectJson:qm(ap),deduplicateJsonSchemaDef:dd(sp)}),md=ip(op);function ht(e,t,r={},n,i,s=!1){return qt(e,t,r,n,void 0,void 0,i,s)[0]}function pd(e){return typeof e!="boolean"?e:e?{}:{not:{}}}function lp(e,t,r,n,i,s,a,o=!1){const{if:l,then:c,else:u,...d}=t,h=e.isValid(l,s||{},r);let m=[d],g=[];if(n){if(c&&typeof c!="boolean"){const b=c;g=g.concat(qt(e,b,r,s,n,i,a,void 0,o))}if(u&&typeof u!="boolean"){const b=u;g=g.concat(qt(e,b,r,s,n,i,a,void 0,o))}}else{const b=h?c:u;if(b!==void 0){const v=pd(b);g=g.concat(qt(e,v,r,s,n,i,a,void 0,o))}}return g.length&&(m=g.map(b=>gr(d,b))),m.flatMap(b=>qt(e,b,r,s,n,i,a,void 0,o))}function yd(e){return e.reduce((r,n)=>n.length>1?n.flatMap(i=>r.map(s=>[...s,i])):(r.forEach(i=>i.push(n[0])),r),[[]])}function gd(e,t){const r=e.patternProperties??{};return Object.fromEntries(Object.entries(r).filter(([n])=>RegExp(n).test(t)))}function cp(e,t,r,n,i,s,a,o,l=!1){const c=vd(e,t,r,n,i,s,a,o,l);if(c.length>1||c[0]!==t)return c;if(ci in t&&!l)return Sd(e,t,r,n,i,s,a).flatMap(d=>qt(e,d,r,s,n,i,a));if(or in t&&Array.isArray(t[or])){const u=t.allOf.map(h=>qt(e,h,r,s,n,i,a,void 0,l));return yd(u).map(h=>({...t,allOf:h}))}return[t]}function vd(e,t,r,n,i,s,a,o,l=!1){const c=Nr(t,r,i,void 0,o);return c!==t?qt(e,c,r,s,n,i,a,o,l):[t]}function Nr(e,t,r,n,i,s=!1){if(!le(e))return e;let a=e,o=n;if(Ke in a){const{$ref:l,...c}=a;if(r.includes(l))return s?{...a,[Co]:!0}:a;r.push(l),a={...Mn(l,t,o),...c,[ps]:l},Te in a&&(o=a[Te])}if(Qe in a){const l=[],c={};for(const[u,d]of Object.entries(a[Qe]??{})){const h=[...r];c[u]=Nr(d,t,h,o,i,!i),l.push(h)}for(const u of new Set(l.flat()))r.includes(u)||r.push(u);a={...a,[Qe]:c}}if(un in a&&!Array.isArray(a.items)&&typeof a.items!="boolean"&&(a={...a,items:Nr(a.items,t,r,o,i)}),i){let l,c;Oe in e&&Array.isArray(e[Oe])?(l=Oe,c=a[Oe]):ve in e&&Array.isArray(e[ve])&&(l=ve,c=a[ve]),l&&c&&(a={...a,[l]:c.map(u=>Nr(u,t,r,o,i))})}return Ae(e,a)?e:a}function up(e,t,r,n,i){const s={...t,properties:{...t.properties}},a=n&&le(n)?n:{};return Object.keys(a).forEach(o=>{if(!(o in s.properties)){if($s in s){const l=gd(s,o);if(Object.keys(l).length>0){s.properties[o]=ht(e,{[or]:Object.values(l)},r,a[o],i),s.properties[o][sn]=!0;return}}if(rn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?Ke in s.additionalProperties?l=ht(e,{[Ke]:s.additionalProperties[Ke]},r,a[o],i):"type"in s.additionalProperties?l={...s.additionalProperties}:Oe in s.additionalProperties||ve in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:ui(a[o])}:l={type:ui(a[o])},s.properties[o]=l,s.properties[o][sn]=!0}else s.properties[o]={type:"null"},s.properties[o][sn]=!0}}),s}function dp(e){return md(e)}function qt(e,t,r,n,i=!1,s=[],a,o,l=!1){return le(t)?cp(e,t,r,i,s,n,a,o,l).flatMap(u=>{let d=u;if(Us in d)return lp(e,d,r,i,s,n,a,l);if(or in d){if(i){const{allOf:m,...g}=d;return[...m,g]}try{d=a?a(d):dp(d)}catch(m){console.warn(`could not merge subschemas in allOf:
|
||
`,m);const{allOf:g,...b}=d;return b}}return Qe in d&&$s in d&&(d=Object.keys(d.properties).reduce((m,g)=>{const b=gd(m,g);return Object.keys(b).length>0&&([m.properties[g]]=qt(e,{allOf:[m.properties[g],...Object.values(b)]},r,he(n,g),void 0,void 0,a,void 0,l)),m},{...d,properties:{...d.properties}})),$s in d||rn in d&&d.additionalProperties!==!1?up(e,d,r,n,a):d}):[{}]}function fp(e,t,r,n,i){let s;const{oneOf:a,anyOf:o,...l}=t;if(Array.isArray(a)?s=a:Array.isArray(o)&&(s=o),s){const c=i===void 0&&n?{}:i,u=Kt(t);s=s.map(h=>Nr(h,r,[]));const d=Os(e,c,s,r,u);if(n){const h=bd(s,!1,r);return Os(e,c,h,r,u),s.map(m=>gr(l,m))}return[gr(l,s[d])]}return[t]}function bd(e,t=!1,r){return e.map(n=>{if(!le(n))return pd(n);const i=t&&r?Nr(n,r,[]):n;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function Sd(e,t,r,n,i,s,a){const{dependencies:o,...l}=t;return fp(e,l,r,n,s).flatMap(u=>xd(e,o,u,r,n,i,s,a))}function xd(e,t,r,n,i,s,a,o){let l=[r];for(const c in t)if((i||he(a,c)!==void 0)&&(!r.properties||c in r.properties)){const[u,d]=_o(c,t);return Array.isArray(d)?l[0]=hp(r,d):le(d)&&(l=mp(e,r,n,c,d,i,s,a,o)),l.flatMap(h=>xd(e,u,h,n,i,s,a,o))}return l}function hp(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function mp(e,t,r,n,i,s,a,o,l){return qt(e,i,r,o,s,a,l).flatMap(u=>{const{oneOf:d,...h}=u,m=gr(t,h);if(d===void 0)return m;const g=d.map(v=>typeof v=="boolean"||!(Ke in v)?[v]:vd(e,v,r,s,a,o));return yd(g).flatMap(v=>pp(e,m,r,n,v,s,a,o,l))})}function pp(e,t,r,n,i,s,a,o,l){const c=i.filter(u=>{if(typeof u=="boolean"||!u?.properties)return!1;const{[n]:d}=u.properties;if(d){const h={type:"object",properties:{[n]:d}};return e.isValid(h,o,r)||s}return!1});return!s&&c.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):c.flatMap(u=>{const d=u,[h]=_o(n,d.properties),m={...d,properties:h};return qt(e,m,r,o,s,a,l).map(b=>gr(t,b))})}function si(e,t,r,n,i,s={},a){if(Array.isArray(r[i])){const l=Kt(r)||n,c=r[i].map(d=>ht(e,d,t,s,a)),u=he(s,l);if(u!==void 0)return c.find(d=>Ae(he(d,[Qe,l,cn],he(d,[Qe,l,Et])),u))}}function Cd(e,t,r,n,i){let s=r;if(bt(r,Ke)&&(s=ht(e,r,t,void 0,i)),n.length===0)return s;const a=Array.isArray(n)?[...n]:Zt(n),[o,...l]=a;if(o!==void 0&&o!==""&&bt(s,o))return s=he(s,o),Cd(e,t,s,l,i)}function vs(e,t,r,n,i,s){const a=Cd(e,t,r,n,s);return a===void 0?i:a}const Dl={title:"!@#$_UNKNOWN_$#@!"};function yp(e,t,r,n,i={},s){const a=Array.isArray(n)?[...n]:n.split(".");let o=r;const l=a.pop(),c=String(l);a.length&&a.forEach(m=>{o=vs(e,t,o,[Qe,m],{},s),bt(o,ve)?o=si(e,t,o,c,ve,he(i,m),s):bt(o,Oe)&&(o=si(e,t,o,c,Oe,he(i,m),s))}),bt(o,ve)?o=si(e,t,o,c,ve,i,s):bt(o,Oe)&&(o=si(e,t,o,c,Oe,i,s));let u=vs(e,t,o,[Qe,l],Dl,s);u===Dl&&(u=void 0);const d=vs(e,t,o,rd,[],s);let h;return u&&Array.isArray(d)&&(h=d.includes(c)),{field:u,isRequired:h}}const gp={type:"object",$id:Jh,properties:{__not_really_there__:{type:"number"}}};function Za(e,t,r,n,i){let s=0;return r&&(le(r.properties)?s+=Object.entries(r.properties).reduce((a,[o,l])=>{const c=n?.[o];if(typeof l=="boolean")return a;if(bt(l,Ke)){const u=ht(e,l,t,c,i);return a+Za(e,t,u,c||{},i)}if((bt(l,ve)||bt(l,Oe))&&c){const u=bt(l,ve)?ve:Oe,d=Kt(l);return a+Un(e,t,c,he(l,u),-1,d,i)}if(l.type==="object")return a+(typeof c=="object"&&c!==null?1:0)+Za(e,t,l,c,i);if(l.type===ui(c)){let u=a+1;return l.default?u+=c===l.default?1:-1:l.const&&(u+=c===l.const?1:-1),u}return a},0):typeof r.type=="string"&&r.type===ui(n)&&(s+=1)),s}function Un(e,t,r,n,i=-1,s,a){const o=n.map(h=>Nr(h,t,[])),l=ud(r,n,s);if(typeof l=="number")return l;const c=o.reduce((h,m,g)=>(Os(e,r,[gp,m],t,s)===1&&h.push(g),h),[]);if(c.length===1)return c[0];c.length||c.push(...o.keys());const u=new Set,{bestIndex:d}=c.reduce((h,m)=>{const{bestScore:g}=h,b=o[m],v=Za(e,t,b,r,a);return u.add(v),v>g?{bestIndex:m,bestScore:v}:h},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function Ad(e){const t=e[Et],r=It(e);return le(t)&&typeof t?.$data=="string"&&r!=="object"&&r!=="array"}function wd(e){return Array.isArray(e.enum)&&e.enum.length===1||Et in e}function Eo(e){return Array.isArray(e.items)&&e.items.every(t=>le(t))}function di(e,t,r=!1,n=!1,i=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],a=i?s:t,o=i?t:s,l=a.map((c,u)=>o[u]!==void 0?di(s[u],t[u],r,n,i):c);return(r||i)&&l.length<o.length&&l.push(...o.slice(l.length)),l}if(le(t)){const s=Object.assign({},e),a=t,o=le(e)?e:void 0;return Object.keys(a).reduce((l,c)=>{const u=a[c],d=o!==void 0&&c in o,h=c in a,m=o?.[c]??{},g=d&&le(m)&&Object.values(m).some(y=>le(y)||Array.isArray(y)),b=d&&le(o?.[c]),v=h&&le(u);return b&&v&&!g?(l[c]={...o?.[c],...u},l):(l[c]=di(o?.[c],u,r,n,i&&(d||!h)),s)},s)}return n&&(e!==void 0&&t==null||typeof t=="number"&&Number.isNaN(t))||i&&t!=null?e:t}function Mr(e,t,r=!1){return Object.keys(t).reduce((n,i)=>{const s=e?e[i]:{},a=t[i];if(e&&i in e&&le(a))n[i]=Mr(s,a,r);else if(r&&Array.isArray(s)&&Array.isArray(a)){let o=a;r==="preventDuplicates"&&(o=a.reduce((l,c)=>(s.includes(c)||l.push(c),l),[])),n[i]=s.concat(o)}else n[i]=a;return n},{...e})}function vp(e){if(Gh in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(Et in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function bp(e,t){const r=new Map(e.map(s=>[String(s.value),s])),n=new Set(t.filter(s=>s!=="*").map(String)),i=e.filter(s=>!n.has(String(s.value)));return t.flatMap(s=>{if(s==="*")return i;const a=r.get(String(s));return a?[a]:[]})}function qn(e,t){if(e.enum){let s,a;if(t){const{enumNames:l,enumOrder:c}=me(t);s=l,a=c}let o=e.enum.map((l,c)=>({label:Array.isArray(s)?s[c]||String(l):s?.[String(l)]||String(l),value:l}));return a&&(o=bp(o,a)),o}let r,n;e.anyOf?(r=e.anyOf,n=t?.anyOf):e.oneOf&&(r=e.oneOf,n=t?.oneOf);let i=Kt(e);if(t){const{optionsSchemaSelector:s=i}=me(t);i=s}return r?.map((s,a)=>{const{title:o}=me(n?.[a]),l=s;let c,u=o;if(i){const d=lr(l,i);c=he(d,cn,he(d,Et)),u=u??d?.title??l.title??String(c)}else c=vp(l),u=u??l.title??String(c);return{schema:l,label:u,value:c}})}function Ls(e,t,r={},n){const i=ht(e,t,r,void 0,n),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(a=>typeof a!="boolean"&&wd(a)):!1}function jo(e,t,r,n){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:Ls(e,t.items,r,n)}const Sp=["string","number","integer","boolean","null"];var Ln;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Ln||(Ln={}));function Oo(e,t){return t?.allOf==="populateDefaults"&&or in e}function Sa(e,t=Ln.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const n=e.items[r];if(typeof n!="boolean")return n}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==Ln.Ignore&&le(e.additionalItems)?e.additionalItems:{}}function xp(e){return typeof e=="string"||Array.isArray(e)?e.length>0:typeof e=="object"&&e!==null?Object.keys(e).length>0:!1}function $d(e){return e===void 0||le(e)&&Object.keys(e).length===0}function _d(e,t){const{default:r,type:n}=e;return Array.isArray(n)&&n.includes("null")&&!xp(t)&&r===null?null:t}function Tl(e,t,r,n,i,s=[],a={},o=!1,l=!1){const{emptyObjectFields:c="populateAllDefaults"}=a;if(n===!0||o)e[t]=r;else if(n==="excludeObjectChildren")(l&&r!==void 0||!le(r)||Object.keys(r).length>0)&&(e[t]=r);else if(c!=="skipDefaults"){const u=i===void 0?s.includes(t):i;le(r)?c==="skipEmptyDefaults"?Object.keys(r).length>0&&(e[t]=r):(Object.keys(r).length>0||s.includes(t))&&(u||c!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||u&&s.includes(t))&&(e[t]=r)}}function Fr(e,t,r={}){const{parentDefaults:n,rawFormData:i,rootSchema:s={},includeUndefinedValues:a=!1,_recurseList:o=[],experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:h}=r;let m=le(i)?i:{};const g=le(t)?t:{};let b=n;const v=b&&l?.nestedDefaultsPrecedence==="ancestorWins";let y=null,f=l,A=o;if(g[Et]!==void 0&&l?.constAsDefaults!=="never"&&!Ad(g))b=g[Et];else if(le(b)&&le(g.default)&&!g[Oe]&&!g[ve]&&!g[Ke])v?b=Mr(g.default,b):b=Mr(b,g.default);else if(cn in g&&!v&&!g[Oe]&&!g[ve]&&!g[Ke])b=g.default;else if(Ke in g){const x=g[Ke];o.includes(x)||(A=o.concat(x),y=Mn(x,s)),y&&!b&&$d(i)&&(b=g.default),d&&y&&!le(i)&&(m=i)}else if(ci in g){const x={...Ml(e,g,r,b),...m};[y]=Sd(e,g,s,!1,[],x,c)}else if(Eo(g)&&!v)b=g.items.map((x,$)=>Fr(e,x,{rootSchema:s,includeUndefinedValues:a,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:Array.isArray(n)?n[$]:void 0,rawFormData:m,required:u,shouldMergeDefaultsIntoFormData:d}));else if(ve in g){const{oneOf:x,...$}=g;if(x.length===0)return;const k=Kt(g),{type:N="null"}=$;!Array.isArray(N)&&Sp.includes(N)&&f?.constAsDefaults==="skipOneOf"&&(f={...f,constAsDefaults:"never"}),y=x[Un(e,s,i??g.default,x,0,k,c)],y=gr($,y)}else if(Oe in g){const{anyOf:x,...$}=g;if(x.length===0)return;const k=Kt(g);y=x[Un(e,s,i??g.default,x,0,k,c)],y=gr($,y)}else Oo(g,l)&&It(g)!=="object"&&(y=ht(e,g,s,i,c));if(y)return Fr(e,y,{rootSchema:s,includeUndefinedValues:a,_recurseList:A,experimental_defaultFormStateBehavior:f,experimental_customMergeAllOf:c,parentDefaults:b,rawFormData:i??m,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});b===void 0&&(b=g.default);let p=Ml(e,g,r,b)??b;if(d){const{arrayMinItems:x={}}=l||{},{mergeExtraDefaults:$}=x,k=ko(e,g,s,i,l,c);(!le(i)||or in g)&&(p=di(p,k,$,!0))}return p}function ko(e,t,r,n,i,s){const a=Oo(t,i),o=a?ht(e,t,r,n,s):t,l=!wd(o)&&Ls(e,o,r,s);let c=n;return l&&(c=qn(o)?.some(m=>Ae(m.value,n))?n:void 0),o[Et]&&i?.constAsDefaults==="always"?c=o.const:le(c)&&le(o.properties)&&(c=Object.keys(o.properties).reduce((d,h)=>{const m=lr(o,h);return h in d&&(a||le(m)&&or in m)&&(d[h]=ko(e,m,r,d[h],i,s)),d},{...c})),c}function Cp(e,t,{rawFormData:r,rootSchema:n={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:l,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},d){{const h=le(r)?r:{},m=t,b=Oo(m,a)||a?.emptyObjectFields!=="skipEmptyDefaults"&&Us in m?ht(e,m,n,h,o):m,v=b[Et],y=Object.keys(b.properties||{}).reduce((f,A)=>{const O=lr(b,A),p=le(v)&&v[A]!==void 0,x=(le(O)&&Et in O||p)&&a?.constAsDefaults!=="never"&&!Ad(O),$=Fr(e,O,{rootSchema:n,_recurseList:s,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,includeUndefinedValues:i===!0,parentDefaults:he(d,A),rawFormData:he(h,A),required:b.required?.includes(A),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});return Tl(f,A,$,i,l,b.required,a,x,O?.type==="null"),f},{});if(b.additionalProperties&&!u){const f=le(b.additionalProperties)?b.additionalProperties:{},A=new Set,O=[];Object.keys(h).filter(p=>!b.properties||!b.properties[p]).forEach(p=>{A.add(p),O.push(p)}),le(d)&&O.length===0&&Object.keys(d).filter(p=>!b.properties||!b.properties[p]).forEach(p=>A.add(p)),A.forEach(p=>{const x=Fr(e,f,{rootSchema:n,_recurseList:s,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,includeUndefinedValues:i===!0,parentDefaults:he(d,p),rawFormData:he(h,p),required:b.required?.includes(p),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});Tl(y,p,x,i,l,O)})}return _d(t,y)}}function Ap(e,t,{rawFormData:r,rootSchema:n={},_recurseList:i=[],experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:a,required:o,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},d){let h=d;const m=t,g=s?.arrayMinItems??{},{populate:b,mergeExtraDefaults:v}=g,y=b==="never",f=b==="requiredOnly",A=b==="all"||!y&&!f,O=g?.computeSkipPopulate??(()=>!1),x=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(h)&&(h=h.map((N,I)=>{const U=Sa(m,Ln.Fallback,I),q=Array.isArray(r)?r[I]:void 0;return Fr(e,U,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:a,parentDefaults:N,rawFormData:q,required:o,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u})})),Array.isArray(r)){const N=Sa(m);if(y)h=r;else{const I=r.map((q,M)=>Fr(e,N,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:a,rawFormData:q,parentDefaults:he(h,M),required:o,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}));h=di(h,I,(f&&o||A)&&v)}}const $=Array.isArray(h)?h.length:0;if(y)return c&&!o?h:h??x;if(f&&!o)return h||void 0;let k;if(!m.minItems||jo(e,m,n,a)||O(e,m,n)||m.minItems<=$)k=h||!o&&!l?h:x;else{const N=h||[],I=Sa(m,Ln.Invert),U=I.default,q=Array.from({length:m.minItems-$},()=>Fr(e,I,{parentDefaults:U,rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:a,required:o,shouldMergeDefaultsIntoFormData:c}));k=N.concat(q)}return _d(t,k)}function Ml(e,t,r={},n){switch(It(t)){case"object":return Cp(e,t,r,n);case"array":return Ap(e,t,r,n);case"boolean":return r.required&&n===void 0?!1:void 0;default:return}}function Ed(e,t,r,n,i=!1,s,a,o){if(!le(t))throw new Error(`Invalid schema: ${t}`);const l=$d(r),[c]=qt(e,t,n??{},r,void 0,void 0,a,void 0,l),u=Fr(e,c,{rootSchema:n??(l?t:void 0),includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:a,rawFormData:r,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:o,requiredAsRoot:!0});if(c.type!=="object"&&le(c.default))return{...u,...r};if(le(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:d}=s||{},h=d==="useDefaultIfFormDataUndefined",m=ko(e,c,n??c,r,s,a);return di(u,m,!0,h,!0)}return u}function jd(e={}){return"widget"in me(e)&&me(e).widget!=="hidden"}function Od(e,t,r={},n,i){if(r[wo]==="files")return!0;if(t.items){const s=ht(e,t.items,n,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function wp(e,t,r={},n,i,s){const a=me(r,i),{label:o=!0}=a;let l=!!o;if(l){const c=It(t),u=!!t[sn];c==="array"&&(l=u||jo(e,t,n,s)||Od(e,t,r,n,s)||jd(r)),c==="object"&&(l=u),c==="boolean"&&r&&!r[wo]&&(l=!1),r?.[Xh]&&(l=!1)}return l}function $p(e,t){if(t.length===0&&typeof e!="object")return e;const r={};return t.forEach(n=>{const i=Array.isArray(n)?n:Zt(n);bt(e,i)&&rt(r,i,he(e,i))}),Array.isArray(e)?Object.keys(r).map(n=>r[n]):r}function _p(e,t){const r=(i,s)=>typeof i!="object"||i===null?!0:(Array.isArray(i)?i.length===0:Object.keys(i).length===0)||s,n=(i,s=[],a=[[]])=>{const o=Object.keys(i);return o.forEach(l=>{const c=i[l];if(typeof c=="object"){const u=a.map(d=>[...d,l]);c[Ao]&&c[ms]!==""?s.push(c[ms]):n(c,s,u)}else l===ms&&c!==""&&a.forEach(u=>{const d=he(t,u),h=o.length===1;(r(d,h)||Array.isArray(d)&&d.every(m=>r(m,h)))&&s.push(u)})}),s};return n(e)}function kd(e){return e==null||e===""?!0:Array.isArray(e)?e.length===0:le(e)?Object.values(e).every(kd):!1}function Ep(e,t){return t?t(e):md(e)}function jp(e,t,r={},n,i){function s(g){return le(g)}function a(g){return le(g)}function o(g,b,v){const{properties:y,additionalProperties:f,patternProperties:A}=g,O=new Set(g.required??[]);function p($,k,N,I=!1){const U=m(k,N,v[$]);if(!I&&le(U)){let q=a(k)?k:{};q.$ref!==void 0&&(q=Mn(q.$ref,r));const M=new Set(q.required??[]);if(Object.entries(U).every(([K,B])=>!M.has(K)&&kd(B)))return}U!==void 0&&(v[$]=U)}if(y!==void 0)for(const[$,k]of Object.entries(y))p($,k,b[$],O.has($));let x;if(A!==void 0){x=[];const $=Object.entries(A).map(([N,I])=>[new RegExp(N),I]),k=new Set(Object.keys(y??{}));for(const[N,I]of Object.entries(b))if(!k.has(N)){const U=$.find(([q])=>q.test(N));U===void 0?x.push(N):p(N,U[1],I)}}if(f!==void 0&&f!==!1){const $=f;if(x!==void 0)for(const k of x)p(k,$,b[k]);else{const k=new Set(Object.keys(y??{}));for(const[N,I]of Object.entries(b))k.has(N)||p(N,$,I)}}return v}function l(g,b,v){const{items:y,additionalItems:f}=g;if(Array.isArray(y)){const A=Math.min(y.length,b.length);let O=0;for(;O<A;O+=1)v[O]=m(y[O],b[O]);if(!f)return v.length=A,v;for(;O<b.length;O+=1)v[O]=m(f,b[O])}else for(let A=0;A<b.length;A+=1)v[A]=m(y,b[A]);return v.length=b.length,v}function c(g,b,v){const{if:y,then:f,else:A}=g;if(y===void 0)return v;const p=(a(y)?e.isValid(y,b,r):y)?f:A;return p===void 0?v:m(p,b,v,!1)}function u(g,b,v,y){if(!Array.isArray(g)||Ls(e,b,r,i))return y;const f=bd(g,!0,r),A=Un(e,r,v,f,0,Kt(b),i),O=g[A],p=le(O)?Nr(O,r,[]):f[A];return m(p,v,y,!1)}function d(g,b,v){const{anyOf:y}=g;if(!Array.isArray(y))return v;if(b===void 0||Array.isArray(b)&&b.length===0||le(b)&&Object.keys(b).length===0){let f=v;for(const A of y)f=m(A,b,f,!1);return f}return u(y,g,b,v)}function h(g,b,v){const{dependencies:y}=g;if(y===void 0||!s(b))return v;let f=v;for(const[A,O]of Object.entries(y))A in b&&!Array.isArray(O)&&(f=m(O,b,f,!1));return f}function m(g,b,v,y=!0){if(b===void 0||g===!1)return;if(g===!0||!g||Object.keys(g).length===0)return v??(y?b:void 0);let f=g;const{$ref:A,allOf:O}=f;if(A!==void 0)return m(Mn(A,r),b,v,y);if(O){f=Ep(f,i);const N=f.allOf;if(N)for(let I=0;I<N.length;I++)v=m(N[I],b,v,!1)}let p=d(f,b,u(f.oneOf,f,b,v));const x=It(f);if(x==="object"){if(!s(b))return;p=o(f,b,s(p)?p:{})}else if(x==="array"){if(!Array.isArray(b))return;f.items!==void 0&&(p=l(f,b,Array.isArray(p)?p:[]))}const $=c(f,b,p);if(f.additionalProperties===!1&&s($)){const N=new Set(Object.keys(f.properties??{})),I=f.patternProperties?Object.keys(f.patternProperties).map(U=>new RegExp(U)):[];for(const U of Object.keys($))!N.has(U)&&!I.some(q=>q.test(U))&&delete $[U]}return h(f,b,$)??(y?b:void 0)}return m(t,n)}const Mt=Symbol("no Value");function Pd(e){if(Array.isArray(e.enum))return e.enum;const t=e.oneOf||e.anyOf;if(!Array.isArray(t))return;const r=t.map(n=>Et in n?n[Et]:Array.isArray(n.enum)&&n.enum.length===1?n.enum[0]:Mt).filter(n=>n!==Mt);return r.length>0?r:void 0}function Op(e,t){const r=Pd(e);if(!r||r.some(i=>Ae(i,t)))return Mt;const n=he(e,cn,Mt);return n!==Mt&&r.some(i=>Ae(i,n))?n:r.length===1?r[0]:void 0}function Qa(e,t,r,n,i={},s){let a;const o=r?.[Qe];if(o){const l={},c=n?.[Qe];c&&Object.keys(c).forEach(h=>{bt(i,h)&&(l[h]=void 0)});const u=Object.keys(o),d={};u.forEach(h=>{const m=i?.[h],g=!bt(n,[Qe,h]),b=lr(n,h),v=lr(r,h),y=ht(e,b,t,m,s),f=Ae(b,v)?y:ht(e,v,t,m,s),A=y.type,O=f.type;if(!A||A===O)if(h in l&&delete l[h],O==="object"||O==="array"&&Array.isArray(m)){const p=Qa(e,t,f,g&&O==="array"?f:y,m,s);(p!==void 0||O==="array")&&(d[h]=p)}else{const p=he(f,cn,Mt),x=he(y,cn,Mt);p!==Mt&&p!==m&&(g&&m===void 0||x===m?l[h]=p:f.readOnly===!0&&(l[h]=void 0));const $=he(f,Et,Mt),k=he(y,Et,Mt);if($!==Mt&&$!==m&&(l[h]=k===m?$:void 0),bt(i,h)){const N=Op(f,m);N!==Mt&&(l[h]=N)}}}),a={...typeof i=="string"||Array.isArray(i)?void 0:i,...l,...d}}else if(n?.type==="array"&&r?.type==="array"&&Array.isArray(i)){let l=n.items,c=r.items;if(typeof l=="object"&&typeof c=="object"&&!Array.isArray(l)&&!Array.isArray(c)){const u=l,d=c;l=ht(e,u,t,i,s),c=Ae(u,d)?l:ht(e,d,t,i,s);const h=he(l,"type"),m=he(c,"type");if(!h||h===m){const g=r.maxItems??-1;if(m==="object")a=i.reduce((b,v)=>{const y=ht(e,u,t,v,s),f=Ae(u,d)?y:ht(e,d,t,v,s),A=Qa(e,t,f,y,v,s);return A!==void 0&&(g<0||b.length<g)&&b.push(A),b},[]);else{const b=Pd(c),v=b?i.filter(y=>b.some(f=>Ae(f,y))):i;a=g>0&&v.length>g?v.slice(0,g):v}}}else typeof l=="boolean"&&typeof c=="boolean"&&l===c&&(a=i)}return a}function Er(e,t,r,n,i,s=[],a){if(Ke in t||ci in t||or in t||Us in t){const l=ht(e,t,n,i,a);if(s.findIndex(u=>Ae(u,l))===-1)return Er(e,l,r,n,i,s.concat(l),a)}let o={[ms]:r.replace(/^\./,"")};if(ve in t||Oe in t){const l=ve in t?t.oneOf:t.anyOf,c=Kt(t),u=Un(e,n,i,l,0,c,a),d=l[u];o={...o,...Er(e,d,r,n,i,s,a)}}if(rn in t&&t[rn]!==!1){rt(o,Ao,!0);const l=le(t[rn])?t[rn]:{},c=t[Qe]??{};for(const u of Object.keys(i??{}))u in c||(o[u]=Er(e,l,`${r}.${u}`,n,he(i,u),s,a))}if(un in t&&Array.isArray(i)){const{items:l,additionalItems:c}=t;Array.isArray(l)?i.forEach((u,d)=>{l[d]?o[d]=Er(e,l[d],`${r}.${d}`,n,u,s,a):c?o[d]=Er(e,c,`${r}.${d}`,n,u,s,a):console.warn(`Unable to generate path schema for "${r}.${d}". No schema defined for it`)}):i.forEach((u,d)=>{o[d]=Er(e,l,`${r}.${d}`,n,u,s,a)})}else if(Qe in t)for(const l in t.properties){const c=lr(t,l);o[l]=Er(e,c,`${r}.${l}`,n,he(i,l),s,a)}return o}function kp(e,t,r="",n,i,s){return Er(e,t,r,n,i,void 0,s)}class Pp{rootSchema;validator;experimental_defaultFormStateBehavior;experimental_customMergeAllOf;constructor(t,r,n,i){r?.[ni]===ys?this.rootSchema=Ya(r,r[Te]??"#"):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,n={},i){return!t||!r?!1:this.validator!==t||!Ae(this.rootSchema,r)||!Ae(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,r,n){return yp(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,n,i){return si(this.validator,this.rootSchema,t,r,n,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,n=!1,i){return Ed(this.validator,t,r,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(t,r,n){return wp(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,n,i){return Un(this.validator,this.rootSchema,t,r,n,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,n){return Os(this.validator,t,r,this.rootSchema,n)}getFromSchema(t,r,n){return vs(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}isFilesArray(t,r){return Od(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return jo(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return Ls(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,r){return jp(this.validator,t,this.rootSchema,r)}retrieveSchema(t,r,n){return ht(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(t,r,n){return Qa(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}toPathSchema(t,r,n){return kp(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}}function Np(e,t,r={},n){return new Pp(e,t,r,n)}function Fp(e){if(!e.includes("data:"))throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[n,i]=r,[s,...a]=n.split(";"),o=s||"",l=decodeURI(a.map(c=>c.split("=")).find(([c])=>c==="name")?.[1]||"unknown");try{const c=atob(i),u=new Array(c.length);for(let h=0;h<c.length;h+=1)u[h]=c.charCodeAt(h);return{blob:new window.Blob([new Uint8Array(u)],{type:o}),name:l}}catch(c){throw new Error(`File is invalid: ${c.message}`)}}function jr(e,t){let r=String(e);for(;r.length<t;)r=`0${r}`;return r}function Nd(e,t){const r=e<=0&&t<=0,n=e<0||t<0;if(!r&&n)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);const i=new Date().getFullYear(),s=r?i+e:e,a=r?i+t:t;if(s>a)return Nd(t,e).reverse();const o=[];for(let l=s;l<=a;l+=1)o.push({value:l,label:jr(l,2)});return o}function Ip(e,t){let r=e;if(Array.isArray(t)){const n=r.split(/(%\d)/);t.forEach((i,s)=>{const a=n.findIndex(o=>o===`%${s+1}`);a>=0&&(n[a]=i)}),r=n.join("")}return r}function Rp(e,t){return Ip(e,t)}function Vs(e,t=[],r){if(Array.isArray(e))return e.map(s=>Vs(s,t)).filter(s=>s!==void 0);const n=e===""||e===null?-1:Number(e),i=t[n];return i?i.value:r}function Dp(e,t,r=[]){const n=Vs(e,r);return Array.isArray(t)?t.filter(i=>!Ae(i,n)):Ae(n,t)?void 0:t}function zs(e,t){return Array.isArray(t)?t.some(r=>Ae(r,e)):Ae(t,e)}function Fd(e,t=[],r=!1){const n=t.map((i,s)=>zs(i.value,e)?String(s):void 0).filter(i=>typeof i<"u");return r?n:n[0]}function Tp(e,t,r,n="indexed",i){if(typeof e>"u"||r&&Array.isArray(e)&&e.length<1||!r&&e===i)return i;if(n==="realValue")return r?e.map(String):String(e);const a=Fd(e,t,r);return typeof a>"u"?i:a}function Mp(e,t,r=[]){const n=Vs(e,r);if(n!=null){const i=r.findIndex(o=>n===o.value),s=r.map(({value:o})=>o);return t.slice(0,i).concat(n,t.slice(i)).sort((o,l)=>+(s.indexOf(o)>s.indexOf(l)))}return t}function Ul(e,t,r){if(e===""||!Array.isArray(t))return r;const n=t.find(s=>String(s.value)===e);if(n)return n.value;const i=Number(e);return!Number.isNaN(i)&&i>=0&&i<t.length?t[i].value:r}function on(e,t,r="indexed",n){return r!=="realValue"?Vs(e,t,n):Array.isArray(e)?e.map(i=>Ul(i,t,n)):Ul(e,t,n)}function Po(e,t,r="indexed"){return r!=="realValue"?String(t):e==null?"":String(typeof e=="object"?t:e)}class Id{errorSchema={};constructor(t){this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){const r=typeof t=="string"?Zt(t):t??[];if(r.length===0)return this.errorSchema;let n=he(this.errorSchema,r);return n||(n={},rt(this.errorSchema,r,n,!0)),n}resetAllErrors(t){return this.errorSchema=t?structuredClone(t):{},this}addErrors(t,r){const n=this.getOrCreateErrorBlock(r);let i=n[pt];return Array.isArray(i)||(i=[],n[pt]=i),Array.isArray(t)?n[pt]=[...new Set([...i,...t])]:n[pt]=[...new Set([...i,t])],this}setErrors(t,r){const n=this.getOrCreateErrorBlock(r),i=Array.isArray(t)?[...new Set([...t])]:[t];return n[pt]=i,this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return r[pt]=[],this}}function Rd(e,t){return yr(e)&&yr(t)?bs(e,t,!0):Array.isArray(e)&&Array.isArray(t)&&e.length===t.length?e.flatMap((r,n)=>{if(Ae(r,t[n]))return[];const i=Rd(r,t[n]);return i.length?i.map(s=>`${n}.${s}`):[String(n)]}):[]}function bs(e,t,r=!1){if(e===t)return[];if(!yr(e))return yr(t)?Object.keys(t):[];if(!yr(t))return Object.keys(e);const n=Object.keys(e),i=new Set(n),s=n.filter(o=>!Ae(e[o],he(t,o))).flatMap(o=>{if(!r)return[o];const l=Rd(e[o],he(t,o));return l.length?l.map(c=>`${o}.${c}`):[o]}),a=Object.keys(t).filter(o=>!i.has(o));return[...s,...a]}function Up(e,t,r=[1900,new Date().getFullYear()+2],n="YMD"){const{day:i,month:s,year:a,hour:o,minute:l,second:c}=e,u={type:"day",range:[1,31],value:i},d={type:"month",range:[1,12],value:s},h={type:"year",range:r,value:a},m=[];switch(n){case"MDY":m.push(d,u,h);break;case"DMY":m.push(u,d,h);break;default:m.push(h,d,u)}return t&&m.push({type:"hour",range:[0,23],value:o},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:c}),m}function qp(e){const 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 Lp(e,t,r={},n=!0){const i={type:t||"text",...qp(e)};return r.inputType?i.type=r.inputType:t||(e.type==="number"?xo()==="."?(i.type="number",n&&i.step===void 0&&(i.step="any")):i.type="text":e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(e.formatMinimum!==void 0&&(i.min=e.formatMinimum),e.formatMaximum!==void 0&&(i.max=e.formatMaximum)),r.autocomplete&&(i.autoComplete=r.autocomplete),r.autocapitalize&&(i.autoCapitalize=r.autocapitalize),r.accept&&(i.accept=r.accept),i}function No(e){return e?.optionValueFormat??"indexed"}const ql={props:{disabled:!1},submitText:"Submit",norender:!1};function Vp(e={}){const t=me(e);if(t?.[_s]){const r=t[_s];return{...ql,...r}}return ql}function be(e,t,r={}){const{templates:n}=t;if(e==="ButtonTemplates")return n[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(n,r[e])){const i=r[e];return n[i]}return r[e]||n[e]}let Ll=0;function Fo(){if(he(globalThis,["process","env","NODE_ENV"])!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||(Ll+=1,e.set(r,`test-id-${Ll}`)),e.get(r)}})}var xa={exports:{}},Le={};var Vl;function zp(){if(Vl)return Le;Vl=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),o=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function b(v){if(typeof v=="object"&&v!==null){var y=v.$$typeof;switch(y){case e:switch(v=v.type,v){case r:case i:case n:case c:case u:return v;default:switch(v=v&&v.$$typeof,v){case o:case a:case l:case h:case d:case s:return v;default:return y}}case t:return y}}}return Le.ContextConsumer=a,Le.ContextProvider=s,Le.Element=e,Le.ForwardRef=l,Le.Fragment=r,Le.Lazy=h,Le.Memo=d,Le.Portal=t,Le.Profiler=i,Le.StrictMode=n,Le.Suspense=c,Le.SuspenseList=u,Le.isAsyncMode=function(){return!1},Le.isConcurrentMode=function(){return!1},Le.isContextConsumer=function(v){return b(v)===a},Le.isContextProvider=function(v){return b(v)===s},Le.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Le.isForwardRef=function(v){return b(v)===l},Le.isFragment=function(v){return b(v)===r},Le.isLazy=function(v){return b(v)===h},Le.isMemo=function(v){return b(v)===d},Le.isPortal=function(v){return b(v)===t},Le.isProfiler=function(v){return b(v)===i},Le.isStrictMode=function(v){return b(v)===n},Le.isSuspense=function(v){return b(v)===c},Le.isSuspenseList=function(v){return b(v)===u},Le.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===i||v===n||v===c||v===u||v===m||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===d||v.$$typeof===s||v.$$typeof===a||v.$$typeof===l||v.$$typeof===g||v.getModuleId!==void 0)},Le.typeOf=b,Le}var zl;function Bp(){return zl||(zl=1,xa.exports=zp()),xa.exports}var Kp=Bp();const Bl=mi(Kp),Ca={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 Hp(e){let{MergedWidget:t}=e;if(!t){const r=e.defaultProps?.options||{};t=({options:n,...i})=>w.jsx(e,{options:{...r,...n},...i}),e.MergedWidget=t}return t}function cr(e,t,r={}){const n=It(e);if(typeof t=="function"||t&&Bl.isForwardRef(G.createElement(t))||Bl.isMemo(t))return Hp(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in r){const i=r[t];return cr(e,i,r)}if(typeof n=="string"){if(!(n in Ca))throw new Error(`No widget for type '${n}' in schema: ${JSON.stringify(e)}`);if(t in Ca[n]){const i=r[Ca[n][t]];return cr(e,i,r)}}throw new Error(`No widget '${t}' for type '${n}' in schema: ${JSON.stringify(e)}`)}function Dd(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t&=t}return t.toString(16)}function ks(e){function t(i){return i!==void 0&&typeof i!="function"&&typeof i!="symbol"}if(Array.isArray(e))return`[${e.map(i=>i===void 0?"undefined":ks(i)).join(",")}]`;if(e===null||typeof e!="object")return JSON.stringify(typeof e=="function"?null:e);const r=e;return`{${Object.keys(r).sort().filter(i=>t(r[i])).map(i=>`${JSON.stringify(i)}:${ks(r[i])}`).join(",")}}`}function Lt(e){return Dd(ks(e))}function Wp(e){return Dd(ks(e))}function Gp(e,t,r={}){try{return cr(e,t,r),!0}catch(n){const i=n;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw n}}function gn(e,t){return`${typeof e=="string"?e:e[Te]}__${t}`}function Vn(e){return gn(e,"description")}function Td(e){return gn(e,"error")}function Io(e){return gn(e,"examples")}function Md(e){return gn(e,"help")}function Ro(e){return gn(e,"title")}function vn(e,t=!1){const r=t?` ${Io(e)}`:"";return`${Td(e)} ${Vn(e)} ${Md(e)}${r}`}function Ud(e,t){return`${e}-${t}`}function nn(e,t){return gn(e,t)}function Aa(e,t){return gn(e,`optional${t}`)}function zn(e){return e==null?!1:typeof e!="object"||Array.isArray(e)?!0:Object.keys(e).length>0}function Jp(e,t){const{rootSchema:r,schemaUtils:n}=e;if(Ae(t,r))return!0;if(Ke in r){const i=n.retrieveSchema(r);return Ae(t,i)}return!1}function Yp(e,t,r){return t?r:e}function Zp(e){return e?new Date(e).toJSON():void 0}function Qp(e,t,r,n=!1){!n&&Array.isArray(r)&&t.default!==void 0&&Fd(t.default,r,n)===void 0&&console.error(`The schema default value "${t.default}" is not one of the values in the enum options for "${e}"`)}function Do(e,t,r){const n=[Qh];return bt(e,fl)&&n.unshift(fl),he(e,[...n,t],r)}function wa(){}function Xp(e,t){if(!Array.isArray(t))return e;const r=u=>u.reduce((d,h)=>(d[h]=!0,d),{}),n=u=>u.length>1?`properties '${u.join("', '")}'`:`property '${u[0]}'`,i=r(e),s=t.filter(u=>u==="*"||i[u]),a=r(s),o=e.filter(u=>!a[u]),l=s.indexOf("*");if(l===-1){if(o.length)throw new Error(`uiSchema order list does not contain ${n(o)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const c=[...s];return c.splice(l,1,...o),c}function $a(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error(`Unable to parse date ${e}`);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}function qd(e,t,r,n={}){const{format:i}=e,s=r.isSelect(e)?qn(e,t):void 0;let a=s?"select":"text";return i&&Gp(e,i,n)&&(a=i),{defaultWidget:a,enumOptions:s}}function ey(e,t,r){const n=e[ps]??e[Ke],i=r.uiSchemaDefinitions,s=n&&i?i[n]:void 0;let a;if(s?!t||Object.keys(t).length===0?a={...s}:a=Mr(s,t):a=t||{},i){let o=e;if(n&&e[Ke]&&!e[ps])try{o=Mn(n,r.rootSchema)}catch(l){return console.warn(`could not resolve $ref in resolveUiSchema:
|
||
`,l),a}for(const l of[ve,Oe]){const c=o[l];if(Array.isArray(c)&&c.length>0){const u=a[l],d=Array.isArray(u)?[...u]:[];let h=!1;for(let m=0;m<c.length;m++){const g=c[m],b=g?.[ps]??g?.[Ke];if(b&&b in i){const v=d[m]||{};d[m]=Mr(i[b],v),h=!0}}h&&(a[l]=d)}}}return a}function Ld(e,t,r=!0,n=[]){if(!le(e))return!1;let i=e,s=n;if(typeof i[Ke]=="string"){const h=i[Ke];if(s.includes(h))return!1;s=[...s,h];try{const m=Mn(h,t);if(le(m)){const{[Ke]:g,...b}=i;i={...m,...b}}}catch{return!1}}if(!r&&(ci in i||Us in i))return!0;const a=i[Qe],o=i[$s],l=i[un],c=i[ci],u=le(c)?Object.values(c).filter(le):[];return[...le(a)?Object.values(a):[],...le(o)?Object.values(o):[],...Array.isArray(l)?l:[l],i[rn],...i[or]??[],...i[Oe]??[],...i[ve]??[],...u,i[Yh],i[Wh]].some(h=>Ld(h,t,!1,s))}function Ss(e){if(e.const||e.enum?.length===1&&e.enum[0]===!0)return!0;if(e.anyOf?.length===1)return Ss(e.anyOf[0]);if(e.oneOf?.length===1)return Ss(e.oneOf[0]);if(e.allOf){const t=r=>Ss(r);return e.allOf.some(t)}return!1}function ty({hideLabel:e,id:t,multiple:r,options:n,registry:i,uiSchema:s,value:a}){if(r||e)return null;const{label:o=!0}=me(s,i.globalUiOptions);if(!o)return null;const l=n.enumOptions?.find(({value:d})=>zs(d,a)),c=l?.schema?.description;if(!c)return null;const u=be("DescriptionFieldTemplate",i,n);return w.jsx(u,{id:Vn(t),description:c,schema:l.schema,uiSchema:s,registry:i})}function Xa(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i+=1){const s=r[i];if(!Object.hasOwn(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function ry(e,t,r,n="customDeep"){if(n==="always")return!0;if(n==="shallow"){const{props:a,state:o}=e;return!Xa(a,t)||!Xa(o,r)}const{props:i,state:s}=e;return!Ae(i,t)||!Ae(s,r)}function Kl(e){const t=[...new Set(e.map(r=>le(r)?It(r):void 0).flat().filter(r=>r!==void 0))];return t.length===1?t[0]:t}function pi(e,t,r,n){const{enableOptionalDataFieldForType:i=[]}=me(n,e.globalUiOptions);let s;return Oe in t&&Array.isArray(t[Oe])?s=Kl(t[Oe]):ve in t&&Array.isArray(t[ve])?s=Kl(t[ve]):s=It(t),!Jp(e,t)&&!r&&!!s&&!Array.isArray(s)&&!!i.find(a=>a===s)}function Hl(e,t=!0){const{year:r,month:n,day:i,hour:s=0,minute:a=0,second:o=0}=e,l=Date.UTC(r,n-1,i,s,a,o),c=new Date(l).toJSON();return t?c:c.slice(0,10)}function Vd(e,t=[]){return e?zd(e,t):[]}function zd(e,t){const r=e[pt],n=`.${t.join(".")}`,i=Array.isArray(r)?r.map(s=>({property:n,message:s,stack:`${n} ${s}`})):[];return Object.keys(e).reduce((s,a)=>{const o=e[a];return a!==pt&&yr(o)?s.concat(zd(o,[...t,a])):s},i)}function ny(e){const t=new Id;return e.length&&e.forEach(r=>{const{property:n,message:i}=r,s=n?Zt(n):[];i&&t.addErrors(i,s)}),t.ErrorSchema}function Qt(e,t,r,n){const i=Array.isArray(r)?r:r?.path,s=e===""?[]:[e],a=i?i.concat(...s):s,o=[t.idPrefix,...a].join(t.idSeparator);let l;return t.nameGenerator&&a.length>0&&(l=t.nameGenerator(a,t.idPrefix,n)),{path:a,[Te]:o,...l!==void 0&&{name:l}}}function iy(e){return Bd(e)}function Bd(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;const n=e[r];return yr(n)?{...t,[r]:Bd(n)}:{...t,[r]:n}},{})}function sy(e){return Object.values(e).every(t=>t!==-1)}function ay(e){const{className:t="form-control",type:r,range:n,value:i,select:s,rootId:a,name:o,disabled:l,readonly:c,autofocus:u,registry:d,onBlur:h,onFocus:m}=e,g=`${a}_${r}`,{SelectWidget:b}=d.widgets,v=G.useCallback(y=>s(r,y),[s,r]);return w.jsx(b,{schema:{type:"integer"},id:g,name:o,className:t,options:{enumOptions:Nd(n[0],n[1])},placeholder:r,value:i,disabled:l,readonly:c,autofocus:u,onChange:v,onBlur:h,onFocus:m,registry:d,label:"","aria-describedby":vn(a)})}function oy(e){const{time:t=!1,disabled:r=!1,readonly:n=!1,options:i,onChange:s,value:a}=e,[o,l]=G.useState($a(a,t));G.useEffect(()=>{l($a(a,t))},[t,a]);const c=G.useCallback((m,g)=>{const b={...o,[m]:typeof g>"u"?-1:g};sy(b)?s(Hl(b,t)):l(b)},[o,s,t]),u=G.useCallback(m=>{m.preventDefault(),!(r||n)&&s(void 0)},[r,n,s]),d=G.useCallback(m=>{if(m.preventDefault(),r||n)return;const g=$a(new Date().toJSON(),t);s(Hl(g,t))},[r,n,t,s]);return{elements:G.useMemo(()=>Up(o,t,i.yearsRange,i.format),[o,t,i.yearsRange,i.format]),handleChange:c,handleClear:u,handleSetNow:d}}function Bn(e){const t=G.useRef(e);return Ae(e,t.current)||(t.current=e),t.current}function ly(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}async function cy(e){const{name:t,size:r,type:n}=e;return new Promise((i,s)=>{const a=new window.FileReader;a.onerror=s,a.onload=o=>{typeof o.target?.result=="string"?i({dataURL:ly(o.target.result,t),name:t,size:r,type:n}):i({dataURL:null,name:t,size:r,type:n})},a.readAsDataURL(e)})}async function uy(e){return Promise.all(Array.from(e).map(cy))}function Wl(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:n,name:i}=Fp(r);return[...t,{dataURL:r,name:i,size:n.size,type:n.type}]}catch{return t}},[])}function dy(e,t,r=!1){const n=G.useMemo(()=>r&&e?Array.isArray(e)?e:[e]:[],[e,r]),i=G.useMemo(()=>Array.isArray(e)?Wl(e):Wl([e||""]),[e]),s=G.useCallback(async o=>{const c=(await uy(o)).map(u=>u.dataURL||null);t(r?n.concat(...c):c[0])},[n,r,t]),a=G.useCallback(o=>{if(r){const l=n.filter((c,u)=>u!==o);t(l)}else t(void 0)},[n,r,t]);return{filesInfo:i,handleChange:s,handleRemove:a}}function fy(e){if(!e)return"";const t=new Date(e),r=jr(t.getFullYear(),4),n=jr(t.getMonth()+1,2),i=jr(t.getDate(),2),s=jr(t.getHours(),2),a=jr(t.getMinutes(),2),o=jr(t.getSeconds(),2),l=jr(t.getMilliseconds(),3);return`${r}-${n}-${i}T${s}:${a}:${o}.${l}`}function ai(e,t,r=!1){if(!t)return e;const{errors:n,errorSchema:i}=e;let s=Vd(t),a=t;return i&&Object.keys(i).length>0&&(a=Mr(i,t,r?"preventDuplicates":!0),s=[...n].concat(s)),{errorSchema:a,errors:s}}function hy(e){const t=e;for(const r in t)if(Object.hasOwn(t,r)){const n=t[r];r===Ke&&typeof n=="string"&&n.startsWith("#")?t[r]=ad+n:t[r]=To(n)}return e}function my(e){return e.map(t=>To(t))}function To(e){return Array.isArray(e)?my([...e]):le(e)?hy({...e}):e}var Fe;(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.ExpandButton="Expand Cycle",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.DeprecatedLabel="%1 (deprecated)",e.CycleDetected='Circular reference ($ref cycle) detected for field "%1". You may choose to expand to the next cycle break',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)"})(Fe||(Fe={}));let Gl=0;function eo(){return Gl+=1,`rjsf-array-item-${Gl}`}function Jl(e){return Array.isArray(e)?e.map(t=>({key:eo(),item:t})):[]}function Kd(e){return Array.isArray(e)?e.map(t=>t.item):[]}function py(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function Hd(e,t,r,n){let{addable:i}=me(n,e.globalUiOptions);return i!==!1&&(t.maxItems!==void 0?i=r.length<t.maxItems:i=!0),i}function Wd(e,t,r,n){if(typeof e.items=="function")try{return e.items(t,r,n)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${r}:`,i);return}else return e.items}function yy(e,t){const{schemaUtils:r,globalFormOptions:n}=e;let i=t.items;return n.useFallbackUiForUnsupportedType&&!i?i={}:Eo(t)&&Hh(t)&&(i=t.additionalItems),r.getDefaultFormState(i)}function gy(e){const{schema:t,fieldPathId:r,uiSchema:n,formData:i=[],disabled:s=!1,readonly:a=!1,autofocus:o=!1,required:l=!1,placeholder:c,onBlur:u,onFocus:d,registry:h,rawErrors:m,name:g,onSelectChange:b}=e,{widgets:v,schemaUtils:y,globalFormOptions:f,globalUiOptions:A}=h,O=y.retrieveSchema(t.items,i),p=n?.items??n,x=qn(O,p),{widget:$="select",title:k,...N}=me(n,A),I=cr(t,$,v),U=k??t.title??g,q=y.getDisplayLabel(t,n,A),M=Bn(Qt("",f,r,!0));return w.jsx(I,{id:M[Te],name:g,multiple:!0,onChange:b,onBlur:u,onFocus:d,options:{...N,enumOptions:x},schema:t,uiSchema:n,registry:h,value:i,disabled:s,readonly:a,required:l,label:U,hideLabel:!q,placeholder:c,autofocus:o,rawErrors:m,htmlName:M.name})}function vy(e){const{schema:t,fieldPathId:r,uiSchema:n,disabled:i=!1,readonly:s=!1,autofocus:a=!1,required:o=!1,hideError:l,placeholder:c,onBlur:u,onFocus:d,formData:h=[],registry:m,rawErrors:g,name:b,onSelectChange:v}=e,{widgets:y,schemaUtils:f,globalFormOptions:A,globalUiOptions:O}=m,{widget:p,title:x,...$}=me(n,O),k=cr(t,p,y),N=x??t.title??b,I=f.getDisplayLabel(t,n,O),U=Bn(Qt("",A,r,!0));return w.jsx(k,{id:U[Te],name:b,multiple:!0,onChange:v,onBlur:u,onFocus:d,options:$,schema:t,uiSchema:n,registry:m,value:h,disabled:i,readonly:s,hideError:l,required:o,label:N,hideLabel:!I,placeholder:c,autofocus:a,rawErrors:g,htmlName:U.name})}function by(e){const{schema:t,uiSchema:r,fieldPathId:n,name:i,disabled:s=!1,readonly:a=!1,autofocus:o=!1,required:l=!1,onBlur:c,onFocus:u,registry:d,formData:h=[],rawErrors:m,onSelectChange:g}=e,{widgets:b,schemaUtils:v,globalFormOptions:y,globalUiOptions:f}=d,{widget:A="files",title:O,...p}=me(r,f),x=cr(t,A,b),$=O??t.title??i,k=v.getDisplayLabel(t,r,f),N=Bn(Qt("",y,n,!0));return w.jsx(x,{options:p,id:N[Te],name:i,multiple:!0,onChange:g,onBlur:c,onFocus:u,schema:t,uiSchema:r,value:h,disabled:s,readonly:a,required:l,registry:d,autofocus:o,rawErrors:m,label:$,hideLabel:!k,htmlName:N.name})}function Sy(e){const{itemKey:t,index:r,name:n,disabled:i,hideError:s,readonly:a,registry:o,uiOptions:l,parentUiSchema:c,canAdd:u,canRemove:d=!0,canMoveUp:h,canMoveDown:m,rawItemSchema:g,itemData:b,itemUiSchema:v,parentFieldPathId:y,itemErrorSchema:f,autofocus:A,onBlur:O,onFocus:p,onChange:x,rawErrors:$,totalItems:k,title:N,handleAddItem:I,handleCopyItem:U,handleRemoveItem:q,handleReorderItems:M}=e,{schemaUtils:L,fields:{ArraySchemaField:K,SchemaField:B},globalUiOptions:Q,globalFormOptions:X}=o,re=G.useMemo(()=>L.retrieveSchema(g,b),[L,g,b]),E=G.useMemo(()=>Qt(r,X,y),[r,X,y]),_=K||B,P=be("ArrayFieldItemTemplate",o,l),C=L.getDisplayLabel(re,v,Q),{description:S}=me(v),j=!!S||!!re.description,{orderable:R=!0,removable:D=!0,copyable:H=!1}=l,T={moveUp:R&&h,moveDown:R&&m,copy:H&&u,remove:D&&d,toolbar:!1};T.toolbar=Object.keys(T).some(Z=>T[Z]);const W=G.useCallback(Z=>{I(Z,r+1)},[I,r]),F=G.useCallback(Z=>{U(Z,r)},[U,r]),V=G.useCallback(Z=>{q(Z,r)},[q,r]),z=G.useCallback(Z=>{M(Z,r,r-1)},[M,r]),J=G.useCallback(Z=>{M(Z,r,r+1)},[M,r]),Y={children:w.jsx(_,{name:n,title:N,index:r,schema:re,uiSchema:v,formData:b,errorSchema:f,fieldPathId:E,required:py(re),onChange:x,onBlur:O,onFocus:p,registry:o,disabled:i,readonly:a,hideError:s,autofocus:A,rawErrors:$}),buttonsProps:{fieldPathId:E,disabled:i,readonly:a,canAdd:u,hasCopy:T.copy,hasMoveUp:T.moveUp,hasMoveDown:T.moveDown,hasRemove:T.remove,index:r,totalItems:k,onAddItem:W,onCopyItem:F,onRemoveItem:V,onMoveUpItem:z,onMoveDownItem:J,registry:o,schema:re,uiSchema:v},itemKey:t,className:"rjsf-array-item",disabled:i,hasToolbar:T.toolbar,index:r,totalItems:k,readonly:a,registry:o,schema:re,uiSchema:v,parentUiSchema:c,displayLabel:C,hasDescription:j};return w.jsx(P,{...Y})}const Gd=G.memo(Sy);function xy(e){const{schema:t,uiSchema:r={},errorSchema:n,fieldPathId:i,formData:s,name:a,title:o,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:h=!1,registry:m,onBlur:g,onFocus:b,rawErrors:v,onChange:y,keyedFormData:f,handleAddItem:A,handleCopyItem:O,handleRemoveItem:p,handleReorderItems:x}=e,$=t.title||o||a,{schemaUtils:k,fields:N,formContext:I,globalUiOptions:U}=m,{OptionalDataControlsField:q}=N,M=G.useMemo(()=>me(r,U),[r,U]),L=G.useMemo(()=>le(t.items)?t.items:{},[t.items]),K=G.useMemo(()=>k.retrieveSchema(L),[k,L]),B=G.useMemo(()=>Kd(f),[f]),Q=pi(m,t,d,r),X=zn(s),re=G.useMemo(()=>Hd(m,t,B,r)&&(!Q||X),[m,t,B,r,Q,X]),E=X?f:[],_=Q?" rjsf-optional-array-field":"",P=e.childFieldPathId??i,C=Q?w.jsx(q,{...e,fieldPathId:P}):void 0,S={canAdd:re,items:E.map((R,D)=>{const{key:H,item:T}=R,W=T,F=n?n[D]:void 0,V=Wd(r,T,D,I),z={itemKey:H,index:D,name:a&&`${a}-${D}`,registry:m,uiOptions:M,parentUiSchema:r,hideError:h,readonly:c,disabled:l,required:d,title:$?`${$}-${D+1}`:void 0,canAdd:re,canMoveUp:D>0,canMoveDown:D<B.length-1,rawItemSchema:L,parentFieldPathId:P,itemErrorSchema:F,itemData:W,itemUiSchema:V,autofocus:u&&D===0,onBlur:g,onFocus:b,rawErrors:v,totalItems:f.length,handleAddItem:A,handleCopyItem:O,handleRemoveItem:p,handleReorderItems:x,onChange:y};return w.jsx(Gd,{...z},H)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${K.type}${_}`,disabled:l,fieldPathId:i,uiSchema:r,onAddClick:A,readonly:c,required:d,schema:t,title:$,formData:B,rawErrors:v,registry:m,optionalDataControl:C},j=be("ArrayFieldTemplate",m,M);return w.jsx(j,{...S})}function Cy(e){const{schema:t,uiSchema:r={},formData:n,errorSchema:i,fieldPathId:s,name:a,title:o,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:h=!1,registry:m,onBlur:g,onFocus:b,rawErrors:v,keyedFormData:y,onChange:f,handleAddItem:A,handleCopyItem:O,handleRemoveItem:p,handleReorderItems:x}=e;let{formData:$=[]}=e;const k=t.title||o||a,{fields:N,formContext:I,globalUiOptions:U}=m,q=G.useMemo(()=>me(r,U),[r,U]),{OptionalDataControlsField:M}=N,L=pi(m,t,d,r),K=zn(n),B=G.useMemo(()=>Array.isArray(t.items)?t.items:[],[t.items]),Q=le(t.additionalItems),X=e.childFieldPathId??s;$.length<B.length&&($=$.concat(new Array(B.length-$.length)));const re=K?y:[],E=L?" rjsf-optional-array-field":"",_=L?w.jsx(M,{...e,fieldPathId:X}):void 0,P=Hd(m,t,$,r)&&Q&&(!L||K),C={canAdd:P,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${E}`,disabled:l,fieldPathId:s,formData:n,items:re.map((j,R)=>{const{key:D,item:H}=j,T=H,W=R>=B.length,F=(W&&le(t.additionalItems)?t.additionalItems:B[R])||{};let V;W?V=r.additionalItems:Array.isArray(r.items)?V=r.items[R]:V=Wd(r,H,R,I);const z=i?i[R]:void 0,J={index:R,itemKey:D,name:a&&`${a}-${R}`,registry:m,uiOptions:q,parentUiSchema:r,hideError:h,readonly:c,disabled:l,required:d,title:k?`${k}-${R+1}`:void 0,canAdd:P,canRemove:W,canMoveUp:R>=B.length+1,canMoveDown:W&&R<$.length-1,rawItemSchema:F,itemData:T,itemUiSchema:V,parentFieldPathId:X,itemErrorSchema:z,autofocus:u&&R===0,onBlur:g,onFocus:b,rawErrors:v,totalItems:y.length,onChange:f,handleAddItem:A,handleCopyItem:O,handleRemoveItem:p,handleReorderItems:x};return w.jsx(Gd,{...J},D)}),onAddClick:A,readonly:c,required:d,registry:m,schema:t,uiSchema:r,title:k,errorSchema:i,rawErrors:v,optionalDataControl:_},S=be("ArrayFieldTemplate",m,q);return w.jsx(S,{...C})}function Ay(e=[]){const t=G.useMemo(()=>Lt(e),[e]),[r,n]=G.useState(()=>({formDataHash:t,keyedFormData:Jl(e)}));let{keyedFormData:i,formDataHash:s}=r;if(t!==s){const o=Array.isArray(e)?e:[],l=i||[];i=o.length===l.length?l.map((c,u)=>({key:c.key,item:o[u]})):Jl(o),s=t,n({formDataHash:s,keyedFormData:i})}const a=G.useCallback(o=>{const l=Kd(o),c=Lt(l);return n({formDataHash:c,keyedFormData:o}),l},[]);return{keyedFormData:i,updateKeyedFormData:a}}function wy(e){const{schema:t,uiSchema:r,errorSchema:n,fieldPathId:i,registry:s,formData:a,onChange:o}=e,{globalFormOptions:l,schemaUtils:c,translateString:u}=s,{keyedFormData:d,updateKeyedFormData:h}=Ay(a),m=G.useRef(d);m.current=d;const g=G.useRef(n);g.current=n;const b=e.childFieldPathId??i,v=G.useCallback((k,N)=>{k&&k.preventDefault();let I;if(g.current){I={};for(const M of Object.keys(g.current)){const L=parseInt(M,10);N===void 0||L<N?rt(I,L,g.current[L]):L>=N&&rt(I,L+1,g.current[L])}}const U={key:eo(),item:yy(s,t)},q=[...m.current];N!==void 0?q.splice(N,0,U):q.push(U),o(h(q),b.path,I)},[s,t,o,h,b]),y=G.useCallback((k,N)=>{k&&k.preventDefault();let I;if(g.current){I={};for(const M of Object.keys(g.current)){const L=parseInt(M,10);L<=N?rt(I,L,g.current[L]):L>N&&rt(I,L+1,g.current[L])}}const U={key:eo(),item:structuredClone(m.current[N].item)},q=[...m.current];N!==void 0?q.splice(N+1,0,U):q.push(U),o(h(q),b.path,I)},[o,h,b]),f=G.useCallback((k,N)=>{k&&k.preventDefault();let I;if(g.current){I={};for(const q of Object.keys(g.current)){const M=parseInt(q,10);M<N?rt(I,M,g.current[M]):M>N&&rt(I,M-1,g.current[M])}}const U=m.current.filter((q,M)=>M!==N);o(h(U),b.path,I)},[o,h,b]),A=G.useCallback((k,N,I)=>{k&&(k.preventDefault(),k.currentTarget.blur());let U;if(g.current){U={};for(const L of Object.keys(g.current)){const K=parseInt(L,10);K===N?rt(U,I,g.current[N]):K===I?rt(U,N,g.current[I]):rt(U,L,g.current[K])}}function q(){const L=m.current.slice();return L.splice(N,1),L.splice(I,0,m.current[N]),L}const M=q();o(h(M),b.path,U)},[o,h,b]),O=G.useCallback((k,N,I,U)=>{const q=typeof N.at(-1)=="number";o(q&&k===void 0?null:k,N,I,U)},[o]),p=G.useCallback(k=>{o(k,b.path,void 0,b?.[Te])},[o,b]),x={...e,formData:a,fieldPathId:b,onSelectChange:p},$={...e,handleAddItem:v,handleCopyItem:y,handleRemoveItem:f,handleReorderItems:A,keyedFormData:d,onChange:O};if(!(un in t)){if(!l.useFallbackUiForUnsupportedType){const N=me(r),I=be("UnsupportedFieldTemplate",s,N);return w.jsx(I,{schema:t,fieldPathId:i,reason:u(Fe.MissingItems),registry:s})}const k={...t,[un]:{type:void 0}};x.schema=k,$.schema=k}return c.isMultiSelect(x.schema)?w.jsx(gy,{...x}):jd(r)?w.jsx(vy,{...x}):Eo(x.schema)?w.jsx(Cy,{...$}):c.isFilesArray(x.schema,r)?w.jsx(by,{...x}):w.jsx(xy,{...$})}function $y(e){const{schema:t,name:r,uiSchema:n,fieldPathId:i,formData:s,registry:a,required:o,disabled:l,readonly:c,hideError:u,autofocus:d,title:h,onChange:m,onFocus:g,onBlur:b,rawErrors:v}=e,{title:y}=t,{widgets:f,translateString:A,globalUiOptions:O}=a,{widget:p="checkbox",title:x,label:$=!0,enumNames:k,...N}=me(n,O),I=cr(t,p,f),U=A(Fe.YesLabel),q=A(Fe.NoLabel);let M;const L=x??y??h??r;if(Array.isArray(t.oneOf))M=qn({oneOf:t.oneOf.map(B=>{if(le(B))return{...B,title:B.title||(B.const===!0?U:q)}}).filter(B=>B)},n);else{const B=t.enum??[!0,!1];!k&&B.length===2&&B.every(Q=>typeof Q=="boolean")?M=[{value:B[0],label:B[0]?U:q},{value:B[1],label:B[1]?U:q}]:M=qn({enum:B},n)}const K=G.useCallback((B,Q,X)=>m(B,i.path,Q,X),[m,i]);return w.jsx(I,{options:{...N,enumOptions:M},schema:t,uiSchema:n,id:i.$id,name:r,onChange:K,onFocus:g,onBlur:b,label:L,hideLabel:!$,value:s,required:o,disabled:l,readonly:c,hideError:u,registry:a,autofocus:d,rawErrors:v,htmlName:i.name})}function _y(e){const[t,r]=G.useState(!1),{name:n,registry:i,schema:s,uiSchema:a,fieldPathId:o}=e,{globalUiOptions:l}=i,c=me(a,l),u=be("CyclicSchemaExpandTemplate",i,c);if(!t)return w.jsx(u,{registry:i,schema:s,uiSchema:a,name:n,fieldPathId:o,onExpand:()=>r(!0)});const{fields:d}=i,{SchemaField:h}=d;return w.jsx(h,{...e,schema:{...s,[Co]:!1}})}function Ey(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function jy(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Oy(e,t){switch(t){case"string":return String(e);case"number":{const r=Number(e);return Number.isNaN(r)?0:r}case"boolean":return!!e;default:return e}}function ky(e){const{id:t,formData:r,displayLabel:n=!0,schema:i,name:s,uiSchema:a,required:o,disabled:l=!1,readonly:c=!1,onBlur:u,onFocus:d,registry:h,fieldPathId:m,onChange:g,errorSchema:b}=e,{translateString:v,fields:y,globalFormOptions:f}=h,[A,O]=G.useState(jy(r)),p=me(a),x=Bn(Qt("__internal_type_selector",f,m)),$=v(Fe.Type),k=G.useMemo(()=>Ey($),[$]),N=q=>{q!=null&&(O(q),g(Oy(r,q),m.path,b,t))};if(!f.useFallbackUiForUnsupportedType){const{reason:q=v(Fe.UnknownFieldType,[String(i.type)])}=e,M=be("UnsupportedFieldTemplate",h,p);return w.jsx(M,{schema:i,fieldPathId:m,reason:q,registry:h})}const I=be("FallbackFieldTemplate",h,p),{SchemaField:U}=y;return w.jsx(I,{schema:i,registry:h,typeSelector:w.jsx(U,{fieldPathId:x,name:`${s}__fallback_type`,schema:k,formData:A,onChange:N,onBlur:u,onFocus:d,registry:h,hideLabel:!n,disabled:l,readonly:c,required:o},r?Lt(r):"__empty__"),schemaField:w.jsx(U,{...e,schema:{type:A,title:v(Fe.Value),...A==="object"&&{additionalProperties:!0}}})})}var sr;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(sr||(sr={}));var li;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(li||(li={}));const Py=/^\$lookup=(.+)/,_a="layoutGrid";function Yl(e,t){return e??t}function Ny(e){return/^\d+?$/.test(e)}const Ir=Fo();function Fy(e,t,r,n,i){const s=r?.[Ga]??{},a=he(r,Zt(e)),o={...a?.[Pr]??{},...t,...s},l={...a};Object.keys(o).length>0&&(l[Pr]=o),Object.keys(s).length>0&&(l[Ga]=s);let{readonly:c}=me(l);if(i===!0||c===void 0&&n===!0){c=!0;const u=l[Pr];u&&ca in u?u[ca]=!0:l[`ui:${ca}`]=!0}return{fieldUiSchema:l,uiReadonly:c}}function Iy(e,t,r="$0m3tH1nG Un3xP3cT3d"){const n=[t].flat().sort(),i=[r].flat().sort();switch(e){case li.ALL:return Ae(n,i);case li.SOME:return n.some(s=>i.includes(s));case li.NONE:return!n.some(s=>i.includes(s));default:return!1}}function Bs(e,t,r){let n={},i=e[t];if(yr(i)){const{children:s,className:a,...o}=i;if(i=s,a){const c=a.split(" ").map(u=>Do(r,u,u)).join(" ");n={...o,className:c}}else n=o}if(!Array.isArray(i))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:n}}function Zl(e,t,r){let n,i=t;if(Ny(r)&&e&&e?.type==="array"&&un in e){const s=Number(r),a=e[un];Array.isArray(a)?s>a.length?n=a.at(-1):n=a[s]:n=a,i={[Te]:t[Te],path:[...t.path.slice(0,t.path.length-1),s]}}return{rawSchema:n,fieldPathId:i}}function Ry(e,t,r,n,i){const{schemaUtils:s,globalFormOptions:a}=e;let o=r,l=i;const c=t.split("."),u=c.pop();let d=s.retrieveSchema(o,n),h=n,m=d.readOnly;c.forEach(v=>{l=Qt(v,a,l);const y=d?.[Qe];if(y)o=y[v]??{};else if(d&&(ve in d||Oe in d)){const f=ve in d?ve:Oe,A=s.findSelectedOptionInXxxOf(d,v,f,h);o=lr(A,v)}else{const f=Zl(d,l,v);o=f.rawSchema??{},l=f.fieldPathId}h=he(h,v,{}),d=s.retrieveSchema(o,h),m=Yl(d.readOnly,m)});let g,b=!1;if((!d||Object.keys(d).length===0)&&(d=void 0),d&&u){if(d&&(ve in d||Oe in d)){const y=ve in d?ve:Oe;d=s.findSelectedOptionInXxxOf(d,u,y,h)}l=Qt(u,a,l),b=d!==void 0&&Array.isArray(d.required)&&d.required.includes(u);const v=Zl(d,l,u);if(v.rawSchema?(d=v.rawSchema,l=v.fieldPathId):(d=d?.[Qe]?.[u],d=d&&s.retrieveSchema(d)),m=Yl(d?.readOnly,m),d&&(ve in d||Oe in d)){const y=ve in d?ve:Oe,f=Kt(d);g={options:d[y],hasDiscriminator:!!f}}}return{schema:d,isRequired:b,isReadonly:m,optionsInfo:g,fieldPathId:l}}function Dy(e,t){let r=e;return typeof r=="string"&&(r=Do(t,r)),typeof r=="function"?r:null}function Ty(e,t){let r,n=null,i={},s;if(typeof t=="string"||t===void 0)r=t??"";else{const{name:a="",render:o,...l}=t;r=a,i=l,Object.entries(i).forEach(([c,u])=>{if(typeof u=="string"){const d=Py.exec(u);if(Array.isArray(d)&&d.length>1){const h=d[1];i[c]=Do(e,h,h)}}}),n=Dy(o,e),!a&&n&&(s=w.jsx(n,{...l,"data-testid":Ir.uiComponent}))}return{name:r,UIComponent:n,uiProps:i,rendered:s}}function Ks(e){const{childrenLayoutGridSchemaId:t,...r}=e,{registry:n,schema:i,formData:s}=r,{schemaUtils:a}=n,o=a.retrieveSchema(i,s);return t.map(l=>G.createElement(Mo,{...r,key:`layoutGrid-${Lt(l)}`,schema:o,layoutGridSchema:l}))}function My(e){const{layoutGridSchema:t,...r}=e,{formData:n,registry:i}=r,{children:s,gridProps:a}=Bs(t,sr.CONDITION,i),{operator:o,field:l="",value:c}=a,u=he(n,Zt(l),null);return Iy(o,u,c)?w.jsx(Ks,{...r,childrenLayoutGridSchemaId:s}):null}function Uy(e){const{layoutGridSchema:t,...r}=e,{registry:n,uiSchema:i}=r,{children:s,gridProps:a}=Bs(t,sr.COLUMN,n),o=me(i),l=be("GridTemplate",n,o);return w.jsx(l,{column:!0,"data-testid":Ir.col,...a,children:w.jsx(Ks,{...r,childrenLayoutGridSchemaId:s})})}function qy(e){const{layoutGridSchema:t,...r}=e,{registry:n,uiSchema:i}=r,{children:s,gridProps:a}=Bs(t,sr.COLUMNS,n),o=me(i),l=be("GridTemplate",n,o);return s.map(c=>w.jsx(l,{column:!0,"data-testid":Ir.col,...a,children:w.jsx(Ks,{...r,childrenLayoutGridSchemaId:[c]})},`column-${Lt(c)}`))}function Ly(e){const{layoutGridSchema:t,...r}=e,{registry:n,uiSchema:i}=r,{children:s,gridProps:a}=Bs(t,sr.ROW,n),o=me(i),l=be("GridTemplate",n,o);return w.jsx(l,{...a,"data-testid":Ir.row,children:w.jsx(Ks,{...r,childrenLayoutGridSchemaId:s})})}function Vy(e){const{gridSchema:t,schema:r,uiSchema:n,errorSchema:i,fieldPathId:s,onBlur:a,onFocus:o,formData:l,readonly:c,registry:u,layoutGridSchema:d,...h}=e,{onChange:m}=h,{fields:g}=u,{SchemaField:b,LayoutMultiSchemaField:v}=g,y=Ty(u,t),{name:f,UIComponent:A,uiProps:O}=y,{schema:p,isRequired:x,isReadonly:$,optionsInfo:k,fieldPathId:N}=Ry(u,f,r,l,s),I=Bn(N);if(y.rendered)return y.rendered;if(p){const U=k?.hasDiscriminator?v:b,{fieldUiSchema:q,uiReadonly:M}=Fy(f,O,n,$,c),L=Zt(f);return w.jsx(U,{"data-testid":k?.hasDiscriminator?Ir.layoutMultiSchemaField:Ir.field,...h,name:f,required:x,readonly:M,schema:p,uiSchema:q,errorSchema:he(i,L),fieldPathId:I,formData:he(l,L),onChange:m,onBlur:a,onFocus:o,options:k?.options,registry:u})}return A?w.jsx(A,{"data-testid":Ir.uiComponent,...h,name:f,required:x,formData:l,readOnly:!!$||c,errorSchema:i,uiSchema:n,schema:r,fieldPathId:s,onBlur:a,onFocus:o,registry:u,...O}):null}function Mo(e){const{uiSchema:t}=e;let{layoutGridSchema:r}=e;const n=me(t);if(!r&&_a in n&&le(n[_a])&&(r=n[_a]),le(r)){if(sr.ROW in r)return w.jsx(Ly,{...e,layoutGridSchema:r});if(sr.COLUMN in r)return w.jsx(Uy,{...e,layoutGridSchema:r});if(sr.COLUMNS in r)return w.jsx(qy,{...e,layoutGridSchema:r});if(sr.CONDITION in r)return w.jsx(My,{...e,layoutGridSchema:r})}return w.jsx(Vy,{...e,gridSchema:r})}Mo.TEST_IDS=Ir;function zy(e){const{fieldPathId:t,title:r,schema:n,uiSchema:i,required:s,registry:a,name:o}=e,l=me(i,a.globalUiOptions),{title:c}=l,{title:u}=n,d=c||r||u||o;if(!d)return null;const h=be("TitleFieldTemplate",a,l);return w.jsx(h,{id:Ro(t),title:d,required:s,schema:n,uiSchema:i,registry:a})}function Ea(e,t,r){const n="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const a=s[Qe]?.[t];return he(a,cn,he(a,Et,n))===r})}function Ql(e,t,r,n,i){const s=t.map(l=>r.retrieveSchema(l,i));let a=e;ve in e?a={...e,[ve]:s}:Oe in e&&(a={...e,[Oe]:s});const o=qn(a,n);if(!o)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(a)}`);return o}function By(e){const{name:t,baseType:r,disabled:n=!1,formData:i,fieldPathId:s,onBlur:a,onChange:o,options:l,onFocus:c,registry:u,uiSchema:d,schema:h,autofocus:m,readonly:g,required:b,errorSchema:v,hideError:y=!1}=e,{widgets:f,schemaUtils:A,globalUiOptions:O}=u,[p,x]=G.useState(Ql(h,l,A,d,i)),$=s[Te],k=Kt(h),N=be("FieldErrorTemplate",u,l),I=be("FieldTemplate",u,l),U=Lt(h),q=Lt(l),M=d?Lt(d):"",L=i?Lt(i):"";G.useEffect(()=>{x(Ql(h,l,A,d,i))},[U,q,A,M,L]);const{widget:K=k?"radio":"select",title:B="",placeholder:Q="",optionsSchemaSelector:X=k,hideError:re,...E}=me(d);if(!X)throw new Error("No selector field provided for the LayoutMultiSchemaField");const _=he(i,X);let P=lr(p[0]?.schema,X);const C=Ea(p,X,_);P=P?.type?P:{...P,type:C?.type||r};const S=cr(P,K,f),j=re===void 0?y:!!re,R=v?.[pt]??[],D={...v};delete D[pt];const H=A.getDisplayLabel(h,d,O),T=V=>{if(n||g)return;const z=Ea(p,X,V),J=Ea(p,X,_);let Y=A.sanitizeDataForNewSchema(z,J,i);Y&&z&&(Y=A.getDefaultFormState(z,Y,"excludeObjectChildren")),Y&&rt(Y,X,V),o(Y,s.path,void 0,$)},W={enumOptions:p,...E},F=!j&&R.length>0?w.jsx(N,{fieldPathId:s,schema:h,errors:R,registry:u}):void 0;return w.jsx(I,{fieldPathId:s,id:$,schema:h,label:(B||h.title)??"",disabled:n||Array.isArray(p)&&p.length===0,uiSchema:d,required:b,readonly:!!g,registry:u,displayLabel:H,errors:F,onChange:o,onKeyRename:wa,onKeyRenameBlur:wa,onRemoveProperty:wa,children:w.jsx(S,{id:$,name:t,schema:h,label:(B||h.title)??"",disabled:n||Array.isArray(p)&&p.length===0,uiSchema:d,autofocus:m,readonly:g,required:b,registry:u,multiple:!1,rawErrors:R,hideError:j,hideLabel:!H,errorSchema:D,placeholder:Q,onChange:T,onBlur:a,onFocus:c,value:_,options:W,htmlName:s.name})})}function Xl(e){const{name:t,disabled:r=!1,errorSchema:n,formData:i,fieldPathId:s,onBlur:a,onChange:o,onFocus:l,options:c,readonly:u,registry:d,required:h=!1,schema:m,uiSchema:g}=e,{schemaUtils:b}=d,v=Lt(i??null),y=G.useMemo(()=>c.map(Z=>b.retrieveSchema(Z,i)),[c,b,v]),[f,A]=G.useState(()=>{const Z=Kt(m);return b.getClosestMatchingOption(i,y,0,Z)}),O=G.useRef(!1),p=G.useRef(i),x=G.useRef(s.$id);G.useEffect(()=>{const Z=p.current,te=x.current;if(p.current=i,x.current=s.$id,!Ae(i,Z)&&s.$id===te){if(O.current){O.current=!1;return}const ie=Kt(m),ae=b.getClosestMatchingOption(i,y,f,ie);ae!==f&&A(ae)}});const $=`${s.$id}${m.oneOf?"__oneof_select":"__anyof_select"}`,k=G.useCallback(Z=>{if(r||u)return;const te=Z!==void 0?parseInt(Z,10):-1;if(te===f)return;const ie=te>=0?y[te]:void 0,ae=f>=0?y[f]:void 0;let de=b.sanitizeDataForNewSchema(ie,ae,i);ie&&(de=b.getDefaultFormState(ie,de,"excludeObjectChildren")),A(te),O.current=!0,o(de,s.path,void 0,$)},[f,y,r,u,b,i,s,o,$]),{widgets:N,fields:I,translateString:U,globalUiOptions:q}=d,{SchemaField:M}=I,L=be("MultiSchemaFieldTemplate",d,q),K=pi(d,m,h,g),B=zn(i),{widget:Q="select",placeholder:X,autofocus:re,autocomplete:E,title:_=m.title,...P}=me(g,q),C=cr({type:"number"},Q,N),S=n?.[pt]??[],j={...n};delete j[pt];const R=b.getDisplayLabel(m,g,q),D=f>=0&&y[f]||null;let H;if(D){const{required:Z,type:te}=m,ie={};Z&&(ie.required=Z),te!==void 0&&!("type"in D)&&(ie.type=te),H=Object.keys(ie).length>0?gr(ie,D):D}let T=[];ve in m&&g&&ve in g?Array.isArray(g[ve])?T=g[ve]:console.warn(`uiSchema.oneOf is not an array for "${_||t}"`):Oe in m&&g&&Oe in g&&(Array.isArray(g[Oe])?T=g[Oe]:console.warn(`uiSchema.anyOf is not an array for "${_||t}"`));let W=g;f>=0&&T.length>f&&(W=T[f]);const F=_?Fe.TitleOptionPrefix:Fe.OptionPrefix,V=_?[_]:[],z=y.map((Z,te)=>{const{title:ie=Z.title}=me(T[te]);return{label:ie||U(F,V.concat(String(te+1))),value:te}}),J=!K||B?w.jsx(C,{id:$,name:`${t}${m.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:k,onBlur:a,onFocus:l,disabled:r||z.length===0,multiple:!1,rawErrors:S,errorSchema:j,value:f>=0?f:void 0,options:{enumOptions:z,...P},registry:d,placeholder:X,autocomplete:E,autofocus:re,label:_??t,hideLabel:!R,readonly:u}):void 0,Y=H&&H.type!=="null"&&w.jsx(M,{...e,schema:H,uiSchema:W})||null;return w.jsx(L,{schema:m,registry:d,uiSchema:g,selector:J,optionSchemaField:Y})}function Ky(e){const{formData:t,onChange:r,fieldPathId:n}=e;return G.useEffect(()=>{t===void 0&&r(null,n.path)},[n,t,r]),null}const Hy=/\.([0-9]*0)*$/,Wy=/[0.]0*$/;function Gy(e){const{registry:t,onChange:r,formData:n,value:i}=e,[s,a]=G.useState(i),{StringField:o}=t.fields,l=xo();let c=n;const u=G.useCallback((h,m,g,b)=>{a(h);const v=typeof h=="string"?h.replace(l,"."):h,y=`${v}`.startsWith(".")?`0${v}`:v,f=typeof y=="string"&&Hy.exec(y)?dl(y.replace(Wy,"")):dl(y);r(f,m,g,b)},[r,l]);if(typeof s=="string"&&typeof c=="number"){const h=s.replace(l,"."),m=String(c).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),g=new RegExp(`^(${m})?\\.?0*$`);h.match(g)&&(c=s)}let d=c;if(typeof c=="number"&&l!=="."){const{schema:h,uiSchema:m}=e,{schemaUtils:g,widgets:b}=t,{defaultWidget:v}=qd(h,m,g,b),{widget:y=v,inputType:f}=me(m);y==="text"&&f!=="number"&&(d=String(c).replace(".",l))}return w.jsx(o,{...e,formData:d,onChange:u})}var $i;function Jy(e){if(!$i){if(typeof document>"u")return;$i=document.createElement("textarea")}var t=`&${e};`;$i.innerHTML=t;var r=$i.value;return r===t?void 0:r}var ne=32,se=9,Ur=13,ce=10,Me=96,ot=126,Be=91,br=94,Ee=62,Ht=35,to=37,xe=45,Vt=61,st=92,Xe=42,Je=95,Ve=60,Jd=64,Rt=93,xt=33,Hs=38,St=58,ro=70,dn=102,Ps=104,ln=119,Rn=116,no=112,Yd=115,Yy=160,Zy=12,Qy=44,Ns=59,Kn=63,zt=46,Ze=47,fn=39,hn=34,qr=43,ct=124,mn=123,Uo=125,Ft=40,Bt=41,Xy=78,eg=110,tg=79,rg=111,Zd=120,Qd=88,io=30,$e=48,_e=57,pe=65,ye=90,qe=97,He=122,Ws=128,Yt=32,ng={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22},ee=ng;function ig(e){if(!tc(e,"---"))return null;let t=3;for(;t<e.length&&(e[t]===" "||e[t]===" ");)t++;if(t<e.length&&e[t]==="\r"&&t++,t>=e.length||e[t]!==`
|
||
`)return null;t++;let r=!1;for(;t<e.length;){let n=t;for(;t<e.length&&e[t]!==`
|
||
`&&e[t]!=="\r";)t++;if(t>=e.length)break;let i=t;if(e[t]==="\r"&&t++,t<e.length&&e[t]===`
|
||
`&&t++,tc(e,"---",n))return{endPos:t,hasValidYaml:r};if(!r){let s=pg(e,n,i);if(s<i){let a=e.charCodeAt(s);if(a>=qe&&a<=He||a>=pe&&a<=ye||a>=$e&&a<=_e||a===Je){for(s++;s<i&&(a=e.charCodeAt(s),a>=qe&&a<=He||a>=pe&&a<=ye||a>=$e&&a<=_e||a===Je||a===xe||a===zt);)s++;s<i&&e.charCodeAt(s)===St&&(s++,s>=i?r=!0:(a=e.charCodeAt(s),(a===ne||a===se)&&(r=!0)))}}}}return null}var sg=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,ag={class:"className",for:"htmlFor",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",autocomplete:"autoComplete",autofocus:"autoFocus",autoplay:"autoPlay",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",classid:"classId",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",crossorigin:"crossOrigin",enctype:"encType",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",inputmode:"inputMode",keyparams:"keyParams",keytype:"keyType",marginheight:"marginHeight",marginwidth:"marginWidth",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",novalidate:"noValidate",radiogroup:"radioGroup",readonly:"readOnly",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap",viewbox:"viewBox"},og={};function Xd(e){if(!e)return og;var t={};for(var r in e){var n=r.toLowerCase(),i=ag[n];if(i)t[i]=e[r];else{var s=r.indexOf(":");s===-1?t[r]=e[r]:t[r.slice(0,s)+r[s+1].toUpperCase()+r.slice(s+2)]=e[r]}}return t}var lg=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function Rr(e){return e.indexOf("&")===-1?e:e.replace(sg,(t,r)=>{var n=Jy(r);if(n)return n;if(r[0]==="#"){var i=r[1]==="x"||r[1]==="X"?Number.parseInt(r.slice(2),16):Number.parseInt(r.slice(1),10);return i===0||i>=55296&&i<=57343||i>1114111?"�":i<=65535?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10),56320+(i-65536&1023))}return t})}var ec=/(javascript|vbscript|data(?!:image)):/i;function pr(e){if(ec.test(e))return null;if(e.indexOf("%")===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(ec.test(t))return null}catch{return null}return e}var vt={},$t,lt;for($t=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],lt=0;lt<$t.length;lt++)vt[$t[lt]]="a";for(vt[231]=vt[199]="c",vt[240]=vt[208]="d",$t=[200,201,202,203,233,232,234,235],lt=0;lt<$t.length;lt++)vt[$t[lt]]="e";for($t=[207,239,206,238,205,237,204,236],lt=0;lt<$t.length;lt++)vt[$t[lt]]="i";for(vt[209]=vt[241]="n",$t=[248,216,339,338,213,245,212,244,211,243,210,242],lt=0;lt<$t.length;lt++)vt[$t[lt]]="o";for($t=[220,252,219,251,218,250,217,249],lt=0;lt<$t.length;lt++)vt[$t[lt]]="u";vt[376]=vt[255]=vt[221]=vt[253]="y";function pn(e){for(var t="",r=-1,n=e.length,i=0;i<n;i++){var s=e.charCodeAt(i);if(s>=qe&&s<=He||s>=$e&&s<=_e){r<0&&(r=i);continue}if(s>=pe&&s<=ye){r>=0&&(t+=e.slice(r,i),r=-1),t+=String.fromCharCode(s+Yt);continue}if(s===ne||s===xe){r>=0&&(t+=e.slice(r,i),r=-1),t+="-";continue}r>=0&&(t+=e.slice(r,i),r=-1);var a=vt[s];a&&(t+=a)}return r>=0&&(t+=e.slice(r)),t}function tc(e,t,r){return e.startsWith(t,r)}var rc=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","circle","ellipse","line","path","polygon","polyline","rect","use","stop","animate","set"]);function yi(e){let t=e.toLowerCase();if(rc.has(t))return!0;let r=t.indexOf(":");return r!==-1?(t=t.slice(r+1),rc.has(t)):!1}var tn=1,nc=2,Nn=4,ic=8,cg=16,Gt=32,Ar=64,ug=(()=>{var e=new Uint8Array(128),t;for(e[se]=tn,e[ce]=tn|nc,e[Zy]=tn,e[Ur]=tn|nc,e[ne]=tn,t=xt;t<=Ze;t++)e[t]=Nn;for(t=St;t<=Jd;t++)e[t]=Nn;for(t=Be;t<=Me;t++)e[t]=Nn;for(t=mn;t<=ot;t++)e[t]=Nn;for(t=$e;t<=_e;t++)e[t]=cg;for(t=pe;t<=ye;t++)e[t]=ic;for(t=qe;t<=He;t++)e[t]=ic;return e})(),dg=/[\p{P}\p{S}]/u,fg=new RegExp("\\p{Zs}","u"),Yr=[];function hg(e){var t=e.indexOf("\r"),r=e.indexOf("\0");if(t===-1&&r===-1)return e;var n=e.length;Yr.length=0;var i=0,s=0;for(t===-1?s=r:r===-1?s=t:s=t<r?t:r;s<n;s++){var a=e.charCodeAt(s);a===Ur?(i<s&&Yr.push(e.slice(i,s)),s+1<n&&e.charCodeAt(s+1)===ce&&s++,Yr.push(`
|
||
`),i=s+1):a===0&&(i<s&&Yr.push(e.slice(i,s)),Yr.push("�"),i=s+1)}return i<n&&Yr.push(e.slice(i)),Yr.join("")}function mg(e){return e.replace(/>\s+</g,"><").replace(/\n+/g," ").trim()}function pg(e,t,r){let n=r??e.length;for(;t<n&&(e[t]===" "||e[t]===" ");)t++;return t}function ef(e){if(!e)return!1;for(var t in e)return!0;return!1}function yg(e){return{attrs:{},children:[{type:ee.text,text:e}],c:!0,type:ee.htmlBlock,tag:"header"}}var gg=/^\n+/;function vg(e){for(var t=e.length;t>0&&(e[t-1]===`
|
||
`||e[t-1]==="\r");)t--;return`${e.slice(0,t).replace(gg,"")}
|
||
|
||
`}function Fn(e){if((e.type===ee.htmlSelfClosing||e.type===ee.htmlBlock)&&e.a)return[];if(e.type===ee.paragraph){var t=e.children;return t?t.flatMap(Fn):[]}return e.type===ee.text?e.text?.trim()?[e]:[]:e.type===ee.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(Fn)}]:[e]}function tf(e){for(var t=0;t<e.length;t++){if(e[t].type===ee.htmlBlock){var r=e[t],n=!1;if(r.c&&t===e.length-1){var i=r.j===void 0?r.a?r.e||"":(r.e||"")+(r.h||""):r.j,s=`</${String(r.tag).toLowerCase()}>`,a=i.toLowerCase().indexOf(s);if(a!==-1){var o=i.slice(a+s.length).replace(/<\/[a-z][a-z0-9-]*\s*>/gi,"");o.trim()&&(n=!0)}}n||(r.c=!1)}"children"in e[t]&&e[t].children&&tf(e[t].children)}}function bg(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.type===ee.paragraph&&n.children)for(var i=n.children,s=0;s<i.length;s++){var a=i[s];if(a.type===ee.htmlSelfClosing&&a.a&&a.tag.toLowerCase()===t){var o=e.slice(0,r);s>0&&o.push({type:ee.paragraph,children:i.slice(0,s)});var l=[];if(s+1<i.length){var c=i.slice(s+1).filter(u=>!(u.type===ee.htmlSelfClosing&&u.a));c.length>0&&(l=c)}return l=l.concat(e.slice(r+1)),{found:!0,beforeClose:o,afterClose:l}}}if((n.type===ee.htmlSelfClosing||n.type===ee.htmlBlock)&&n.a&&n.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,r),afterClose:e.slice(r+1)}}return{found:!1,beforeClose:e,afterClose:[]}}function Sg(e){var t="";for(var r in e){var n=e[r];n===!0?t+=` ${r}`:n!==void 0&&n!=null&&n!==!1&&(t+=` ${r}="${String(n)}"`)}return t}function sc(e,t,r,n){var i;return t===void 0?i=Sg(r):i=t.length>0&&t.charCodeAt(0)>ne?` ${t}`:t,`<${e}${i}${n}`}function ac(e){var t=e.tag,r=e.type===ee.htmlSelfClosing,n=e,i=n.b,s=`</${t}>`;if(!r&&n.a)return{kind:"literal",literal:(n.h||s)+(n.e||"")};if(r){var a=e;return a.a?{kind:"literal",literal:a.h||s}:a.m?{kind:"literal",literal:a.m}:{kind:"literal",literal:sc(t,i,e.attrs," />")}}var o=sc(t,i,e.attrs,">"),l=n.children,c=l!=null&&l.length>0;if(n.c&&n.j!==void 0)return c?{kind:"sandwich",open:o,close:s}:{kind:"literal",literal:n.j};if(n.c&&!c)return{kind:"literal",literal:o+(n.e||"")+(n.h||s)};if(l!=null&&l.length>0){for(var u="",d=0;d<l.length;d++){var h=l[d];if(h.type!==ee.text)return{kind:"sandwich",open:o,close:s};u+=h.text}return{kind:"literal",literal:o+u+s}}var m=n.e||"";return m&&m.indexOf(s)!==-1?{kind:"literal",literal:o+m}:{kind:"literal",literal:o+m+s}}function xg(e,t,r){var n=[],i=e,s=r;if(i&&n.push(i),Array.isArray(t))for(var a=0;a<t.length;a++)n.push(t[a]);else t!=null&&n.push(t);s&&n.push(s);for(var o=[],l=0;l<n.length;l++){var c=n[l];typeof c=="string"&&o.length>0&&typeof o.at(-1)=="string"?o[o.length-1]=o.at(-1)+c:o.push(c)}return o}function kn(e){return e==null||e.tagfilter!==!1}function Cg(e,t,r,n){var i=t(e,r,n);return i===null?null:wg(i)}function Ag(e){var t=[];if(!e)return t;for(var r in e)r.charCodeAt(0)===94&&t.push({identifier:r,footnote:e[r].target});return t}function oc(e){for(var t=0,r=e.length;t<r;){var n=e.charCodeAt(t);if(n>=pe&&n<=ye)return e.toLowerCase();t++}return e}function so(e,t,r){if(t.indexOf(".")===-1){var n=e?.[t];if(n)return n;if(e){var i=oc(t);if(i!==t){var s=e[i];if(s)return s}}return r}for(var a=e,o=t.split("."),l=0,c=!1;l<o.length;){if(a=a?.[o[l]],a===void 0){c=l===0;break}l++}if(c&&e){var u=oc(o[0]);if(u!==o[0])for(a=e[u],l=1;a!==void 0&&l<o.length;)a=a?.[o[l]],l++}return a||r}function wg(e){for(var t=!1,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=ne||n===hn||n===to||n===Ve||n===Ee||n===Be||n===st||n===Rt||n===br||n===Me||n>=123){t=!0;break}}if(!t)return e;for(var i="",r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n===to&&r+2<e.length){var s=e.charCodeAt(r+1),a=e.charCodeAt(r+2);if((s>=$e&&s<=_e||s>=pe&&s<=ro||s>=qe&&s<=dn)&&(a>=$e&&a<=_e||a>=pe&&a<=ro||a>=qe&&a<=dn)){i+=e[r]+e[r+1]+e[r+2],r+=2;continue}}if(n>=55296&&n<=57343){if(n<=56319&&r+1<e.length){var o=e.charCodeAt(r+1);if(o>=56320&&o<=57343){i+=encodeURI(e[r]+e[r+1]),r++;continue}}i+=e[r];continue}i+=encodeURI(e[r])}return i}function $g(...e){return e.filter(Boolean).join(" ")}var _g=new Set(["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"]),Fs=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function lc(e){return _g.has(e.toLowerCase())}function Eg(e){return Fs.lastIndex=0,Fs.test(e)}function cc(e){return Fs.lastIndex=0,e.replace(Fs,(t,r,n,i)=>`<${r}${n}${i}`)}function qo(e,t){var r=e||{},n=r.slugify,i;if(n){var s=n;i=a=>s(a,pn)}else i=pn;return{disableAutoLink:r.disableAutoLink,disableFrontmatter:r.disableFrontmatter,disableParsingRawHTML:r.disableParsingRawHTML,enforceAtxHeadings:r.enforceAtxHeadings,evalUnserializableExpressions:r.evalUnserializableExpressions,forceBlock:r.forceBlock,forceInline:t===void 0?r.forceInline:t,ignoreHTMLBlocks:r.ignoreHTMLBlocks,optimizeForStreaming:r.optimizeForStreaming,preserveFrontmatter:r.preserveFrontmatter,sanitizer:r.sanitizer||pr,slugify:i,tagfilter:kn(r)}}var jg=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,Og=/^<[A-Z]/,ao=["script","pre","style","textarea"],gi=new Set(ao),kg=/<(?:pre|script|style|textarea)\b/i,uc=/<(?:pre|script|style|textarea)\b/iy,ja=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,dc=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,rf=new Uint8Array(128);(()=>{for(var e=[Me,Xe,Je,ot,Vt,Be,xt,Ve,st,Hs,ce,Ps,ln,dn],t=0;t<e.length;t++)rf[e[t]]=1})();var fc=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function Pg(e){return gi.has(e)}function Ng(e){return kg.test(e)}function nf(e,t,r){for(var n=t,i=r;n<i&&(e.charCodeAt(n)===ne||e.charCodeAt(n)===se);)n++;if(n>=i)return!1;e.charCodeAt(n)===ct&&n++;for(var s=0;n<i;){for(;n<i&&(e.charCodeAt(n)===ne||e.charCodeAt(n)===se);)n++;if(n>=i)break;if(e.charCodeAt(n)===ct&&s>0){for(var a=n+1;a<i&&(e.charCodeAt(a)===ne||e.charCodeAt(a)===se);)a++;if(a>=i)return!0}if(e.charCodeAt(n)===St&&n++,n>=i||e.charCodeAt(n)!==xe)return!1;for(;n<i&&e.charCodeAt(n)===xe;)n++;for(n<i&&e.charCodeAt(n)===St&&n++,s++;n<i&&(e.charCodeAt(n)===ne||e.charCodeAt(n)===se);)n++;if(n<i)if(e.charCodeAt(n)===ct)n++;else return!1}return s>0}var Fg=/[\u0000-\u001F\u007F]/g,Ig={action:1,background:1,cite:1,data:1,formaction:1,href:1,longdesc:1,poster:1,src:1,"xlink:href":1},Rg=/&#(x[0-9a-f]+|[0-9]+);?/gi;function Dg(e){return e.indexOf("&#")===-1?e:e.replace(Rg,(t,r)=>{var n=r.charCodeAt(0)===Zd||r.charCodeAt(0)===Qd?Number.parseInt(r.slice(1),16):Number.parseInt(r,10);return n>0&&n<=1114111?String.fromCodePoint(n):t})}function Tg(e,t,r){if(r&&t.charCodeAt(0)===mn)return!1;var n=e.charCodeAt(0),i=e.charCodeAt(1);if((n===rg||n===tg)&&(i===eg||i===Xy))return!(r&&t==="");var s=e.toLowerCase();if(s==="srcdoc")return!0;if(s==="style")return/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(t);if(Ig[s]===1){var a=Dg(Rr(t));if(pr(a)===null)return!0;var o=a.replace(Fg,"");return o!==a&&pr(o)===null}return!1}function oo(e){return"<"+(e.f?"/":"")+e.tag+e.g+e.b+(e.n?e.r?" />":"/>":">")}function hc(e,t,r,n){for(var i=[],s=t,a=0;a<n.length;a+=2){var o=n[a];if(o>s){var l=e.slice(s,o).trim();l&&i.push(l)}s=n[a+1]}if(s<r){var c=e.slice(s,r).trim();c&&i.push(c)}return i.join(" ")}function ir(e,t){if(e.charCodeAt(t)!==Ve)return null;let r=t+1,n=e.length,i=!1;e.charCodeAt(r)===Ze&&(r++,i=!0);let s=r,a=e.charCodeAt(r);if(!(a>=qe&&a<=He||a>=pe&&a<=ye))return null;for(;r<n&&(e.charCodeAt(r)>=qe&&e.charCodeAt(r)<=He||e.charCodeAt(r)>=pe&&e.charCodeAt(r)<=ye||e.charCodeAt(r)>=$e&&e.charCodeAt(r)<=_e||e.charCodeAt(r)===xe);)r++;let o=e.slice(s,r);if(!o)return null;let l=o.charCodeAt(0),c=l>=pe&&l<=ye||o.indexOf("-")!==-1,u=r;for(;r<n&&(e.charCodeAt(r)===ne||e.charCodeAt(r)===se||e.charCodeAt(r)===ce);)r++;let d=e.slice(u,r);if(r===u&&r<n){var h=e.charCodeAt(r);if(h!==Ee&&h!==Ze)return null}let m=r,g={},b=!1;for(var v=null;r<n;){let M=e.charCodeAt(r);if(M===Ee){let L=v?hc(e,m,r,v):e.slice(m,r);return{r:b,u:c,f:i,b:L,q:v!=null,n:!1,g:d,attrs:g,end:r+1,tag:o}}if(M===ne||M===se||M===ce){r++;continue}if(M===Ze&&r+1<n&&e.charCodeAt(r+1)===Ee){b=r>m&&e.charCodeAt(r-1)===ne;let L=v?hc(e,m,r,v):e.slice(m,r);return{r:b,u:c,f:i,b:L,q:v!=null,n:!0,g:d,attrs:g,end:r+2,tag:o}}var y=r,f=e.charCodeAt(r);if(!(f>=qe&&f<=He||f>=pe&&f<=ye||f===Je||f===St))return null;for(r++;r<n;){var A=e.charCodeAt(r);if(A>=qe&&A<=He||A>=pe&&A<=ye||A>=$e&&A<=_e||A===Je||A===zt||A===St||A===xe)r++;else break}for(var O=e.slice(y,r),p=r;r<n&&(e.charCodeAt(r)===ne||e.charCodeAt(r)===se);)r++;var x,$;if(e.charCodeAt(r)===Vt){for(r++;r<n&&(e.charCodeAt(r)===ne||e.charCodeAt(r)===se);)r++;var k=e.charCodeAt(r);if(k===hn||k===fn){r++;for(var N=r;r<n&&e.charCodeAt(r)!==k;)r++;if(r>=n)return null;if(x=e.slice(N,r),r++,r<n){var I=e.charCodeAt(r);if(I!==ne&&I!==se&&I!==ce&&I!==Ee&&I!==Ze)return null}$=r}else if(k===mn){var U=1,N=r;for(r++;r<n&&U>0;){var A=e.charCodeAt(r);A===mn?U++:A===Uo&&U--,r++}x=e.slice(N,r),$=r}else{for(var N=r;r<n;){var q=e.charCodeAt(r);if(q===ne||q===se||q===Ee||q===ce||q===hn||q===fn||q===Vt||q===Ve||q===Me)break;r++}if(r===N)return null;x=e.slice(N,r),$=r}}else x="",$=p;Tg(O,x,c)?(v===null&&(v=[]),v.push(y,$)):g[O]=x}return null}function Nt(e){var t=e.indexOf("<");if(t===-1)return e;for(var r="",n=0,i=!1;t!==-1;){var s=ir(e,t);s?(s.q&&(r+=e.slice(n,t)+oo(s),n=s.end,i=!0),t=e.indexOf("<",s.end)):t=e.indexOf("<",t+1)}return i?r+e.slice(n):e}function Mg(e,t,r){if(!r.optimizeForStreaming&&e.indexOf("[")===-1)return!1;for(var n=0,i=e.length,s=!1,a=!1;n<i;){for(var o=e.indexOf(`
|
||
`,n),l=o<0?i:o,c=n,u=0;c<l&&u<4;)if(e.charCodeAt(c)===ne)u++,c++;else if(e.charCodeAt(c)===se)u+=4,c++;else break;if(c>=l){s=!1,n=o<0?i:o+1;continue}if(u<4){var d=e.charCodeAt(c);if(d===Me||d===ot){for(var h=d,m=0,g=c;g<l&&e.charCodeAt(g)===h;)m++,g++;if(m>=3){var b=!0;if(h===Me){for(var v=g;v<l;v++)if(e.charCodeAt(v)===Me){b=!1;break}}if(b){s=!1;for(var y=o<0?i:o+1;y<i;){for(var f=y,A=0;f<i&&A<4;){var O=e.charCodeAt(f);if(O===ne)A++,f++;else if(O===se)A+=4,f++;else break}if(A<4&&f<i&&e.charCodeAt(f)===h){for(var p=0;f<i&&e.charCodeAt(f)===h;)p++,f++;if(p>=m){for(;f<i&&(e.charCodeAt(f)===ne||e.charCodeAt(f)===se);)f++;if(f>=i||e.charCodeAt(f)===ce){n=f>=i?i:f+1;break}}}for(;y<i&&e.charCodeAt(y)!==ce;)y++;y<i&&y++}y>=i&&(n=i,a=!0);continue}}}}for(var x=c;x<l&&e.charCodeAt(x)===Ee;){x++,x<l&&e.charCodeAt(x)===ne&&x++;for(var $=0;x<l&&$<4;)if(e.charCodeAt(x)===ne)$++,x++;else if(e.charCodeAt(x)===se)$+=4,x++;else break;if($>=4)break;s=!1}if(!s&&u<4&&x<l&&e.charCodeAt(x)===Be&&!(x+1<i&&e.charCodeAt(x+1)===br)){var k=sf(e,x,t);if(k){n=k,s=!1;continue}}var N=e.charCodeAt(c);if(N===Ht&&u<4)s=!1;else if(u<4&&(N===xe||N===Xe||N===Je)){for(var I=c,U=0;I<l;){var q=e.charCodeAt(I);if(q===N)U++;else if(q!==ne&&q!==se)break;I++}s=!(U>=3&&I>=l)}else s=!0;n=o<0?i:o+1}return a}function sf(e,t,r){let n=e.length;if(e.charCodeAt(t)!==Be)return null;let i=t+1<n&&e.charCodeAt(t+1)===br,s=t+1;for(;s<n;){var a=e.charCodeAt(s);if(a===Rt){s++;break}if(a===Be)return null;a===st&&s+1<n&&s++,s++}if(s>n||e.charCodeAt(s-1)!==Rt)return null;let o=e.slice(t+1,s-1);if(o.length>999)return null;let l=xs(o);if(!l||s>=n||e.charCodeAt(s)!==St)return null;s++;let c=!1;for(;s<n;){let M=e.charCodeAt(s);if(M===ne||M===se)s++;else if(M===ce&&!c)c=!0,s++;else break}if(i){let M=e.indexOf(`
|
||
`,s),L=M<0?n:M,K=e.slice(s,L).trim();return r[l]={target:K,title:void 0},M<0?n:M+1}var u;if(s<n&&e.charCodeAt(s)===Ve){s++;for(var d=s;s<n&&e.charCodeAt(s)!==Ee&&e.charCodeAt(s)!==ce;)e.charCodeAt(s)===st&&s+1<n&&s++,s++;if(s>=n||e.charCodeAt(s)!==Ee)return null;u=e.slice(d,s),s++;for(var h=e.indexOf(`
|
||
`,s),m=h<0?n:h,g=s;g<m&&(e.charCodeAt(g)===ne||e.charCodeAt(g)===se);)g++;if(g<m){if(g===s)return null;var b=e.charCodeAt(g);if(b!==hn&&b!==fn&&b!==Ft)return null}}else{for(var d=s,v=0;s<n;){var a=e.charCodeAt(s);if(a===Ft)v++;else if(a===Bt){if(v===0)break;v--}else{if(a===ne||a===se||a===ce)break;a===st&&s+1<n&&s++}s++}if(u=e.slice(d,s),!u)return null}for(;s<n&&(e.charCodeAt(s)===ne||e.charCodeAt(s)===se);)s++;var y=e.indexOf(`
|
||
`,s),f=y<0?n:y,A,O=!1,p=s,x=s;if(s===f&&s<n)for(x=s+1;x<n&&(e.charCodeAt(x)===ne||e.charCodeAt(x)===se);)x++;if(x<n){var $=e.charCodeAt(x);if($===hn||$===fn||$===Ft){for(var k=$===Ft?41:$,N=x+1,I=N;N<n;){var U=e.charCodeAt(N);if(U===k){for(var q=N+1;q<n&&(e.charCodeAt(q)===ne||e.charCodeAt(q)===se);)q++;(q>=n||e.charCodeAt(q)===ce)&&(A=e.slice(I,N),O=!0,p=q<n?q+1:n);break}if(U===st&&N+1<n){N+=2;continue}if(U===ce&&N+1<n&&e.charCodeAt(N+1)===ce)break;N++}if(!O&&x===s)return null}}if(O)return r[l]||(r[l]={target:Rr(Dn(u)),title:A===void 0?A:Rr(Dn(A))}),p;for(;s<f&&(e.charCodeAt(s)===ne||e.charCodeAt(s)===se);)s++;return s<f?null:(r[l]||(r[l]={target:Rr(Dn(u)),title:A}),y<0?n:y+1)}var Ot=new Uint8Array(ug);for(Ot[Ht]|=Gt,Ot[Ee]|=Gt,Ot[xe]|=Gt|Ar,Ot[qr]|=Gt,Ot[Xe]|=Gt|Ar,Ot[Je]|=Gt|Ar,Ot[Me]|=Gt|Ar,Ot[ot]|=Gt|Ar,Ot[Ve]|=Gt|Ar,Ot[Be]|=Ar,Ot[xt]|=Ar,Ot[ct]|=Gt,_i=$e;_i<=_e;_i++)Ot[_i]|=Gt;var _i;function mc(e){if(e.indexOf("[")<0&&e.indexOf("]")<0)return!1;for(var t=0;t<e.length;t++){if(e.charCodeAt(t)===st){t++;continue}if(e.charCodeAt(t)===Be||e.charCodeAt(t)===Rt)return!0}return!1}function xs(e){for(var t=e.length,r=!0,n=t>0,i=0;i<t;i++){var s=e.charCodeAt(i);if(s===ne){if(r){n=!1;break}r=!0}else if(s<33||s>126||s>=pe&&s<=ye){n=!1;break}else r=!1}if(n&&!r)return e;var a=e.replace(/\s+/g," ").trim();return a.indexOf("ẞ")!==-1?a.replace(/\u1E9E/g,"ss").toLowerCase():a.toLowerCase()}function Lo(e){return e<Ws?Ot[e]:e===Yy?tn:0}function Dn(e){return e.indexOf("\\")===-1?e:e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,"$1")}var lo=null,co=-1,Cs=-1;function Ue(e,t){if(t>=co&&t<=Cs&&e===lo)return Cs;var r=e.indexOf(`
|
||
`,t),n=r<0?e.length:r;return lo=e,co=t,Cs=n,n}function ke(e,t){let r=Ue(e,t);return r<e.length?r+1:r}function fi(e,t,r){for(;t<r;){let n=e.charCodeAt(t);if(n!==ne&&n!==se)break;t++}return t}function pc(e,t){let r=ke(e,t);for(;r<e.length;){let n=Ue(e,r);if(_t(e,r,n))return r;r=ke(e,r)}return e.length}function Lr(e,t,r,n){let i=0;for(;t+i<r&&e.charCodeAt(t+i)===n;)i++;return i}var De=0,Ie=0;function nt(e,t,r){for(De=0,Ie=0;t+Ie<r;){let n=e.charCodeAt(t+Ie);if(n===se)De+=4-De%4;else if(n===ne)De++;else break;Ie++}}function _t(e,t,r){return fi(e,t,r)>=r}function Ug(e,t){if(!e)return e;var r=t.v||(t.v=Object.create(null)),n=r[e];if(n===void 0)return r[e]=0,e;for(var i=n+1,s=`${e}-${i}`;r[s]!==void 0;)i++,s=`${e}-${i}`;return r[e]=i,r[s]=0,s}function qg(e,t,r,n){let i=Ue(e,t);if(nt(e,t,i),De>3)return null;let s=t+Ie;if(e.charCodeAt(s)!==Ht)return null;let a=Lr(e,s,i,35);if(a<1||a>6||(s+=a,s<i&&e.charCodeAt(s)!==ne&&e.charCodeAt(s)!==se))return null;s=fi(e,s,i);for(var o=i;o>s&&e.charCodeAt(o-1)===ne;)o--;for(var l=o;o>s&&e.charCodeAt(o-1)===Ht;)o--;if(o<l)if(o===s||e.charCodeAt(o-1)===ne)for(;o>s&&e.charCodeAt(o-1)===ne;)o--;else o=l;let c=e.slice(s,o),u=Tn(c,!1,r,n);return{node:{type:ee.heading,level:a,children:u,id:""},end:ke(e,i)}}function Lg(e,t,r){var n=e.charCodeAt(t);if(n!==Vt&&n!==xe)return!1;for(var i=t;i<r&&e.charCodeAt(i)===n;)i++;for(;i<r&&(e.charCodeAt(i)===ne||e.charCodeAt(i)===se);)i++;return i>=r}function Dr(e,t){let r=Ue(e,t);if(nt(e,t,r),De>3)return null;let n=t+Ie,i=e.charCodeAt(n);if(i!==xe&&i!==Xe&&i!==Je)return null;let s=0;for(;n<r;){let a=e.charCodeAt(n);if(a===i)s++;else if(a!==ne&&a!==se)return null;n++}return s<3?null:{node:{type:ee.breakThematic},end:ke(e,r)}}var yc=0,gc=0,vc="";function Vg(e,t,r){let n=Ue(e,t);if(nt(e,t,n),De>3)return null;let i=De,s=t+Ie,a=e.charCodeAt(s);if(a!==Me&&a!==ot)return null;let o=Lr(e,s,n,a);if(o<3)return null;s+=o;let l=fi(e,s,n),c=n;if(a===Me){for(let L=l;L<n;L++)if(e.charCodeAt(L)===Me)return null}for(;c>l&&(e.charCodeAt(c-1)===ne||e.charCodeAt(c-1)===se);)c--;let u=e.slice(l,c),d="",h="",m=u.indexOf(" ");m===-1?d=u:(d=u.slice(0,m),h=u.slice(m+1).trim()),d=Dn(d);var g;if(h){fc.lastIndex=0;for(var b;(b=fc.exec(h))!=null;)g||(g={}),g[b[1]]=b[2]===void 0?b[3]:b[2]}let v=ke(e,n),{length:y,length:f}=e;var A;a===yc&&o===gc?A=vc:(A=String.fromCharCode(a).repeat(o),yc=a,gc=o,vc=A);for(var O=v;O<e.length;){var p=e.indexOf(A,O);if(p===-1)break;for(var x=p,$=0;x>0&&$<4&&e.charCodeAt(x-1)===ne;)x--,$++;if($<=3&&(x===0||e.charCodeAt(x-1)===ce)){for(var k=p+o;k<e.length&&e.charCodeAt(k)===a;)k++;var N=Ue(e,k);if(_t(e,k,N)){y=x,f=ke(e,N);break}}O=p+1}var I;if(i===0)I=y>v&&e.charCodeAt(y-1)===ce?e.slice(v,y-1):e.slice(v,y);else{I="";for(var U=v;U<y;){var q=Ue(e,U);nt(e,U,q);var M=Math.min(Ie,i);I+=`${e.slice(U+M,q)}
|
||
`,U=ke(e,q)}I.length>0&&I.charCodeAt(I.length-1)===ce&&(I=I.slice(0,-1))}return{node:{type:ee.codeBlock,lang:d||void 0,text:I,infoString:h||void 0,attrs:g},end:f}}function bc(e,t,r){for(var n=0,i=t;i<r&&n<4;)e.charCodeAt(i)===se?n+=4-n%4:n++,i++;if(n<4)return"";for(var s="",a=4;a<n;a++)s+=" ";return s+e.slice(i,r)}function zg(e,t){let r=Ue(e,t);if(nt(e,t,r),De<4)return null;let n="",i=t;for(;i<e.length;){let h=Ue(e,i);if(nt(e,i,h),_t(e,i,h)){for(var s=`${bc(e,i,h)}
|
||
`,a=ke(e,h);a<e.length;){var o=Ue(e,a);if(_t(e,a,o)){s+=`${bc(e,a,o)}
|
||
`,a=ke(e,o);continue}nt(e,a,o),De>=4&&(n+=s,i=a);break}if(i!==a)break;continue}if(De<4)break;let m=0,g=0;var l=0;for(let b=i;b<h&&g<4;b++){if(e.charCodeAt(b)===se){var c=4-g%4;g+c>4&&(l=g+c-4),g+=c}else g++;m++}var u="";if(l>0)for(var d=0;d<l;d++)u+=" ";u+=e.slice(i+m,h),n+=`${u}
|
||
`,i=ke(e,h)}for(;n.length>0&&n.charCodeAt(n.length-1)===ce;)n=n.slice(0,-1);return n?{node:{type:ee.codeBlock,lang:void 0,text:n,infoString:void 0,attrs:void 0},end:i}:null}function Bg(e,t,r,n){let i=Ue(e,t);if(nt(e,t,i),De>3)return null;let s=t+Ie;if(e.charCodeAt(s)!==Ee)return null;let a="",o=t,l,c=!1,u=!1,d=!1;for(;o<e.length;){let B=Ue(e,o);nt(e,o,B);let Q=o+Ie;if(e.charCodeAt(Q)===Ee){let X=Q+1;var h=De+1,m=!1;if(X<B){var g=e.charCodeAt(X);g===ne?(X++,h++,m=!0):g===se&&(m=!0)}for(var b="",v=!1,y=X;y<B;y++)if(e.charCodeAt(y)===se){v=!0;break}if(v){var f=h;if(m&&X<B&&e.charCodeAt(X)===se){for(var A=4-f%4,O=0;O<A-1;O++)b+=" ";f+=A,X++}for(var p=X;p<B;p++)if(e.charCodeAt(p)===se){for(var x=4-f%4,$=0;$<x;$++)b+=" ";f+=x}else b+=e[p],f++}else b=e.slice(X,B);if(!(a||l)){let re=b.match(/^\[!([A-Za-z]+)\]\s*$/);if(re){l=re[1].toUpperCase(),o=ke(e,B);continue}}a+=`${b}
|
||
`;var k=b.trimStart();k.startsWith("```")||k.startsWith("~~~")?d=!d:(b.startsWith(" ")||b.startsWith(" "))&&(d=!0),u=k.length>0,o=ke(e,B)}else if(a&&!_t(e,o,B)&&u){if(De<4){var N=o+Ie,I=N<B?e.charCodeAt(N):0;if(I===Ht||I===Ee||I===Me||I===ot||I===Ve||(I===xe||I===Xe||I===Je)&&Dr(e,o)||(I===xe||I===Xe||I===qr)&&N+1<B&&(e.charCodeAt(N+1)===ne||e.charCodeAt(N+1)===se))break;if(I>=$e&&I<=_e){for(var U=N;U<B&&e.charCodeAt(U)>=$e&&e.charCodeAt(U)<=_e;)U++;if(U<B&&(e.charCodeAt(U)===zt||e.charCodeAt(U)===Bt))break}}if(d)break;a+=`${e.slice(o,B)}
|
||
`,c=!0,o=ke(e,B)}else break}if(!(a||l))return null;var{inBlockQuote:q,l:M}=r;r.inBlockQuote=!0,c&&(r.l=!0);var L=r.i;r.i=L||!_t(e,o,e.length);let K=Tr(a||"",r,n);return r.i=L,r.inBlockQuote=q,r.l=M,{node:{type:ee.blockQuote,children:K,alert:l||void 0},end:o}}function af(e,t,r){for(var n=0,i=t;i<r;i++)e.charCodeAt(i)===se?n+=4-n%4:n++;return n}function wr(e,t,r){if(nt(e,t,r),De>3)return null;var n=t+Ie;if(n>=r)return null;var i=e.charCodeAt(n),s=De,a=n,o=n;if(i===xe||i===Xe||i===qr){if(a=n+1,a<r&&e.charCodeAt(a)!==ne&&e.charCodeAt(a)!==se&&e.charCodeAt(a)!==ce)return null}else if(i>=$e&&i<=_e){for(;o<r&&o-n<9;){var l=e.charCodeAt(o);if(l<$e||l>_e)break;o++}if(o>n&&o<r){var c=e.charCodeAt(o);if(c===zt||c===Bt){if(a=o+1,a<r&&e.charCodeAt(a)!==ne&&e.charCodeAt(a)!==se&&e.charCodeAt(a)!==ce)return null}else return null}else return null}else return null;var u=a,d=af(e,t,a),h=0,m=u,g=d;if(u>=r)return{ordered:i>=$e&&i<=_e,marker:i>=$e&&i<=_e?e[o]:e[n],start:i>=$e&&i<=_e?Number.parseInt(e.slice(n,o),10):void 0,contentStart:u,contentCol:d+1,markerCol:s,isEmpty:!0};for(;m<r&&(e.charCodeAt(m)===ne||e.charCodeAt(m)===se);){if(e.charCodeAt(m)===se){var b=4-g%4;g+=b}else g++;m++,h++}var v=m>=r,y=g-d;return v||y>4?(g=d+1,m=u+1,h=1):h===0&&(g=d+1,m=u,h=1),{ordered:i>=$e&&i<=_e,marker:i>=$e&&i<=_e?e[o]:e[n],start:i>=$e&&i<=_e?Number.parseInt(e.slice(n,o),10):void 0,contentStart:m,contentCol:g,markerCol:s,isEmpty:v}}var In=0;function Sc(e,t,r,n){var i=0,s=t;for(In=0;s<r&&i<n;){var a=e.charCodeAt(s);if(a===se){var o=4-i%4;if(i+o>n){In=i+o-n,s++,i=n;break}i+=o}else if(a===ne)i++;else break;s++}return s}function xc(e,t,r,n){var i=Ue(e,t),s=wr(e,t,i);if(!s)return null;var a=[],o=t,l=s.contentCol,c="",u=s.isEmpty,d=!1,h=!1;if(!s.isEmpty){for(var m=!1,g=s.contentStart;g<i;g++)if(e.charCodeAt(g)===se){m=!0;break}if(m){var b="",v=af(e,t,s.contentStart),y=v-s.contentCol;if(y>0)for(var f=0;f<y;f++)b+=" ";for(var A=s.contentStart;A<i;A++)if(e.charCodeAt(A)===se){for(var O=4-v%4,p=0;p<O;p++)b+=" ";v+=O}else b+=e[A],v++;c=`${b}
|
||
`}else c=`${e.slice(s.contentStart,i)}
|
||
`}for(o=ke(e,i);o<e.length;){var x=Ue(e,o);nt(e,o,x);var $=e.charCodeAt(o+Ie);if(De<l&&($===xe||$===Xe||$===Je)&&De<=3&&Dr(e,o))break;var k=wr(e,o,x);if(k&&k.ordered===s.ordered&&k.marker===s.marker&&k.markerCol<l){a.push({contentCol:l,raw:c,hasBlankAfter:d,isEmpty:u}),d&&(h=!0),l=k.contentCol,u=k.isEmpty,d=!1,c=k.isEmpty?"":`${e.slice(k.contentStart,x)}
|
||
`,o=ke(e,x);continue}if(_t(e,o,x)){var N=Sc(e,o,x,l);if(In>0||N<x){for(var I="",U=0;U<In;U++)I+=" ";c+=`${I+e.slice(N,x)}
|
||
`}else c+=`
|
||
`;o=ke(e,x);for(var q=!1,M=0;M<c.length;M++){var L=c.charCodeAt(M);if(L!==ce&&L!==Ur&&L!==ne&&L!==se){q=!0;break}}if(u&&!q)if(o<e.length){var K=Ue(e,o),B=wr(e,o,K);if(!B||B.ordered!==s.ordered||B.marker!==s.marker)break;d=!0}else break;if(o<e.length){var Q=Ue(e,o);nt(e,o,Q);var X=e.charCodeAt(o+Ie);if((X===xe||X===Xe||X===Je)&&De<=3&&Dr(e,o))break;var re=wr(e,o,Q);if(re&&re.ordered===s.ordered&&re.marker===s.marker&&re.markerCol<l){d=!0;continue}if(!_t(e,o,Q)&&De<l)break}continue}if(De>=l){var E=Sc(e,o,x,l);if(In>0){for(var _="",P=l,C=0;C<In;C++)_+=" ",P++;for(var S=E;S<x;S++)if(e.charCodeAt(S)===se){for(var j=4-P%4,R=0;R<j;R++)_+=" ";P+=j}else _+=e[S],P++;c+=`${_}
|
||
`}else c+=`${e.slice(E,x)}
|
||
`;o=ke(e,x);continue}for(var D=!1,H=0;H<c.length;H++){var T=c.charCodeAt(H);if(T!==ce&&T!==Ur&&T!==ne&&T!==se){D=!0;break}}if(!d&&D&&!u){var W=o+Ie,F=e.charCodeAt(W),V=F===Ht||F===Ee||F===Ve||F===Me||F===ot||(F===xe||F===Xe||F===Je||F===qr)&&(Dr(e,o)!=null||wr(e,o,x)!=null)||F>=$e&&F<=_e&&wr(e,o,x)!=null;if(!V){c+=`${e.slice(W,x)}
|
||
`,o=ke(e,x);continue}}break}if(a.push({contentCol:l,raw:c,hasBlankAfter:d,isEmpty:u}),a.length===0)return null;var z=h;if(!z)for(var J=0;J<a.length;J++){if(a[J].hasBlankAfter&&J<a.length-1){z=!0;break}if(!a[J].isEmpty){for(var Y=a[J].raw,Z=Y.length,te=0,ie=!1,ae=!1,de=!1,ge=!1,ue=0,Ce=0,Pe=-1;te<Z;){var fe=Y.indexOf(`
|
||
`,te);if(fe<0&&(fe=Z),ge){nt(Y,te,fe);for(var Ye=Y.slice(te+Ie,fe),it=0;it<Ye.length&&Ye.charCodeAt(it)===ue;)it++;it>=Ce&&Ye.slice(it).trim()===""&&(ge=!1),te=fe<Z?fe+1:Z;continue}if(_t(Y,te,fe)){Pe>=0?de=!0:ie&&(ae=!0),te=fe<Z?fe+1:Z;continue}if(nt(Y,te,fe),Pe>=0){if(De>=Pe){te=fe<Z?fe+1:Z;continue}var Se=wr(Y,te,fe);if(Se&&Se.markerCol<Pe&&Se.contentCol<=Pe){te=fe<Z?fe+1:Z;continue}if(Se){te=fe<Z?fe+1:Z;continue}Pe=-1,de&&(ae=!0,de=!1)}var oe=Y.slice(te+Ie,fe),Ne=oe.charCodeAt(0);if((Ne===Me||Ne===ot)&&De<=3){for(var Ct=0;Ct<oe.length&&oe.charCodeAt(Ct)===Ne;)Ct++;if(Ct>=3){if(ae&&ie){z=!0;break}ge=!0,ue=Ne,Ce=Ct,ie=!0,te=fe<Z?fe+1:Z;continue}}var et=De<=3?wr(Y,te,fe):null;if(et&&ie){if(ae){z=!0;break}Pe=et.contentCol,de=!1,te=fe<Z?fe+1:Z,ie=!0;continue}if(ae){z=!0;break}ie=!0,te=fe<Z?fe+1:Z}if(z)break}}for(var yt=[],Ge=0;Ge<a.length;Ge++){for(var At=a[Ge],ut=At.raw,dt=ut.length;dt>0&&ut.charCodeAt(dt-1)===ce;)dt--;var ft=dt<ut.length?ut.slice(0,dt):ut,Br=null;if(ft.length>=3&&ft.charCodeAt(0)===Be){var Sr=ft[1];(Sr===" "||Sr==="x"||Sr==="X")&&ft.charCodeAt(2)===Rt&&(Br={type:ee.gfmTask,completed:Sr==="x"||Sr==="X"},ft=ft.slice(3))}var tt;if(At.isEmpty&&ft.trim()==="")tt=[];else if(z){var Kr=r.inList;r.inList=!0;var bi=r.i;r.i=bi||Ge!==a.length-1,tt=Tr(ft,r,n),r.i=bi,r.inList=Kr}else{var dr=r.inList;r.inList=!0;var Hr=r.i;if(r.i=Hr||Ge!==a.length-1,tt=Tr(ft,r,n),r.i=Hr,r.inList=dr,tt.length===1&&tt[0].type===ee.paragraph)tt=tt[0].children;else if(r.p){var xr=[];r.p.push({src:tt,dest:xr,unwrap:!0}),tt=xr}else{for(var er=[],jt=0;jt<tt.length;jt++)if(tt[jt].type===ee.paragraph)for(var tr=tt[jt].children,bn=0;bn<tr.length;bn++)er.push(tr[bn]);else er.push(tt[jt]);tt=er}}if(Br){var Wr=[Br,{type:ee.text,text:" "}];if(r.p)r.p.push({src:tt,dest:Wr,unwrap:!1});else for(var Wt=0;Wt<tt.length;Wt++)Wr.push(tt[Wt]);yt.push(Wr)}else yt.push(tt)}return{node:{type:s.ordered?ee.orderedList:ee.unorderedList,start:s.ordered?s.start:void 0,items:yt},end:o}}var Is=new Set(["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]);function nr(e,t,r){let n={};for(let[a,o]of Object.entries(e)){let l=a.toLowerCase();if(l==="style"&&typeof o=="string"){let c={},u=[],d=0,h=0;for(let g=0;g<o.length;g++){let b=o.charCodeAt(g);b===Ft?d++:b===Bt?d--:b===Ns&&d===0&&(u.push(o.slice(h,g)),h=g+1)}h<o.length&&u.push(o.slice(h));let m=!1;u.forEach(g=>{let b=g.indexOf(":");if(b===-1)return;let v=g.slice(0,b).trim(),y=g.slice(b+1).trim();if(v&&y){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(y)){m=!0;return}let f=v.indexOf("-")===-1?v:v.replace(/-([a-z])/g,(A,O)=>O.toUpperCase());c[f]=y}}),!m&&Object.keys(c).length>0&&(n[a]=c)}else if((l==="href"||l==="src")&&r?.sanitizer){let c=r.sanitizer(o,t,l);c!=null&&(n[a]=c)}else if(o==="")n[a]=!0;else if(o.length>=2&&o.charCodeAt(0)===mn&&o.charCodeAt(o.length-1)===Uo){var i=o.slice(1,-1);if(i.length>0){var s=i.charCodeAt(0);if(s===Be||s===mn)try{n[a]=JSON.parse(i);continue}catch{}}if(i==="true"){n[a]=!0;continue}if(i==="false"){n[a]=!1;continue}if(r?.evalUnserializableExpressions)try{n[a]=(0,eval)(`(${i})`);continue}catch{}n[a]=i}else n[a]=o}return n}function kr(e,t,r){let n=t.length;if(n===0)return r;var i=t.charCodeAt(0),s=i>=pe&&i<=ye||i>=qe&&i<=He;if(!s){for(var a=String.fromCharCode(i),o=e.length-n,l=r;l<=o;){var c=e.indexOf(a,l);if(c===-1||c>o)return-1;for(var u=!0,d=1;d<n;d++){var h=e.charCodeAt(c+d),m=t.charCodeAt(d);if(h>=pe&&h<=ye&&(h+=Yt),m>=pe&&m<=ye&&(m+=Yt),h!==m){u=!1;break}}if(u)return c;l=c+1}return-1}i>=pe&&i<=ye&&(i+=Yt);for(let b=r;b<=e.length-n;b++){var g=e.charCodeAt(b);if(g>=pe&&g<=ye&&(g+=Yt),g!==i)continue;let v=!0;for(let y=1;y<n;y++){let f=e.charCodeAt(b+y),A=t.charCodeAt(y);if(f>=pe&&f<=ye&&(f+=Yt),A>=pe&&A<=ye&&(A+=Yt),f!==A){v=!1;break}}if(v)return b}return-1}function Kg(e,t,r){let n=t.length;var i=t.charCodeAt(0);i>=pe&&i<=ye&&(i+=Yt);for(let a=Math.min(r,e.length-n);a>=0;a--){var s=e.charCodeAt(a);if(s>=pe&&s<=ye&&(s+=Yt),s!==i)continue;let o=!0;for(let l=1;l<n;l++){let c=e.charCodeAt(a+l),u=t.charCodeAt(l);if(c>=pe&&c<=ye&&(c+=Yt),u>=pe&&u<=ye&&(u+=Yt),c!==u){o=!1;break}}if(o)return a}return-1}var Rs=-1;function uo(e,t,r){let n=r.toLowerCase(),i=`<${n}`,s=`</${n}`,a=1,o=t,l=e.length;for(Rs=-1;o<l&&a>0;){let d=kr(e,i,o),h=kr(e,s,o);if(h===-1)return-1;if(d!==-1&&d<h){let m=ir(e,d);m?(m.tag.toLowerCase()===n&&!m.f&&!m.n&&!yi(m.tag)&&a++,o=m.end):o=d+1}else{var c=h+s.length,u=c<l?e.charCodeAt(c):62;if((u===Ee||u===ne||u===se||u===ce)&&(a--,a===0)){Rs=h;let m=h+s.length;for(;m<l&&e.charCodeAt(m)!==Ee;)m++;return m+1}o=h+1}}return-1}function of(e,t,r,n){if(n.ignoreHTMLBlocks||n.disableParsingRawHTML)return null;var i=Ue(e,t);if(nt(e,t,i),De>3&&!r.inHTML)return null;var s=t+Ie;if(e.charCodeAt(s)!==Ve)return null;var a=e.indexOf(">",s+1);if(a!==-1&&a<i){var o=e.slice(s+1,a);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(o)||/^[^\s@]+@[^\s@]+$/.test(o))return null}var l=Hg(e,s);if(l>=1&&l<=5){var c=e.length;if(l===1){for(var u=e.length,d=0;d<ao.length;d++){var h=kr(e,`</${ao[d]}>`,s);h>=0&&h<u&&(u=h)}if(u<e.length){var m=e.indexOf(">",u);c=m>=0?ke(e,m+1):e.length}}else{var g=l===2?"-->":l===3?"?>":l===4?">":"]]>",b=e.indexOf(g,s);b>=0&&(c=ke(e,b+g.length))}var v=e.slice(s,c);if(l>=2)return{node:{type:ee.htmlComment,text:v,s:!1,raw:!0},end:c};var y="div",f=v.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);f&&(y=f[1]);var A=ir(e,s),O={},p;A&&!A.f&&(O=nr(A.attrs,y,n),p=A.g+A.b);var x=[],$=y.toLowerCase(),k=`</${$}`,N=kr(v,k,0),I="",U,q,M;if(A?.f){M=v.slice(0,A.end-s);for(var L=v.slice(A.end-s);L.length>0&&L.charCodeAt(L.length-1)===ce;)L=L.slice(0,-1);L&&(q=Nt(L))}else if(A&&!A.f){var K=A.end-s;if(N===-1){for(var B=v;B.length>0&&B.charCodeAt(B.length-1)===ce;)B=B.slice(0,-1);U=Nt(B)}else{var Q=K;v.charCodeAt(Q)===ce&&Q++;for(var X=N;X>Q;){var re=v.charCodeAt(X-1);if(re!==ne&&re!==se&&re!==ce&&re!==Ur)break;X--}var E=v.slice(Q,X);E&&(q=Nt(E));for(var _=v.slice(N);_.length>0&&_.charCodeAt(_.length-1)===ce;)_=_.slice(0,-1);M=Nt(_),I=v.slice(K,N).trim()}}var P=A?A.f:!1;return{node:{type:ee.htmlBlock,tag:y,attrs:O,b:p,children:x,e:q,h:M,j:U,text:I,c:!0,a:P},end:c}}if(l===6||l===7){var C=pc(e,t),S=C<e.length?C:e.length,j=e.slice(s,S),R=C<e.length?ke(e,C):e.length,D=ir(e,s);if(D){var H=D.tag,T=H.toLowerCase(),W=D.f;if(W){var F=e.slice(D.end,S);return{node:{type:ee.htmlBlock,tag:H,attrs:{},children:[],h:e.slice(s,D.end),e:F?Nt(F):void 0,text:F,c:!0,a:!0},end:R}}if(D.n||yi(H))return{node:{type:ee.htmlBlock,tag:H,attrs:nr(D.attrs,H,n),b:D.g+D.b,children:[],text:"",c:!1,a:!1},end:D.end<e.length&&e.charCodeAt(D.end)===ce?D.end+1:D.end};var V=r.d||0,z=e.slice(s,S),J=-1,Y=-1,Z=!1;if(V<10){for(var te=`</${T}`,ie=D.end-s,ae=1,de=ie;de<z.length&&ae>0;){var ge=kr(z,`<${T}`,de),ue=kr(z,te,de);if(ue===-1)break;if(ge!==-1&&ge<ue){var Ce=ge+T.length+1;if(Ce<z.length){var Pe=z.charCodeAt(Ce);(Pe===ne||Pe===se||Pe===ce||Pe===Ee||Pe===Ze)&&ae++}de=ge+1}else{var fe=ue+te.length;if(fe<z.length){var Ye=z.charCodeAt(fe);if((Ye===Ee||Ye===ne||Ye===se||Ye===ce)&&(ae--,ae===0)){J=ue;for(var it=fe;it<z.length&&z.charCodeAt(it)!==Ee;)it++;Y=it+1;break}}else if(ae--,ae===0){J=ue,Y=z.length;break}de=ue+1}}if(J===-1&&!D.f&&(l===6||D.u)){var Se=uo(e,D.end,T);if(Se!==-1){for(var oe=Rs,Ne=D.end,Ct=!1,et=!1,yt=!1,Ge=0,At=!1,ut=!1,dt=Ne;dt<oe;){var ft=e.charCodeAt(dt);if(ft===ce)ut&&(Ct=!0),At||Ge++,ut=!0,dt++;else if(ft===ne||ft===se)dt++;else{if(!At&&(At=!0,Ge>=2&&ft===Ve)){yt=!0;break}if(ut=!1,ft===Ve){var Br=e.charCodeAt(dt+1)|32;if((Br===no||Br===Yd||Br===Rn)&&(uc.lastIndex=dt,uc.test(e))){et=!0;break}}dt++}}if(Ct&&!yt&&!et){var Sr=Ue(e,Se);S=Sr,R=ke(e,Sr),z=e.slice(s,S),j=e.slice(s,S),J=oe-s,Y=Se-s,Z=!0}}}}var tt=D.b.indexOf(`
|
||
`)!==-1||D.g.indexOf(`
|
||
`)!==-1,Kr=!1;if(J!==-1){var bi=z.slice(Y).trim();Kr=bi.length===0}var dr=!1,Hr=S,xr=R;if(J!==-1){var er=s+Y,jt=Ue(e,er-1);if(er<jt){for(var tr=er;tr<jt&&(e.charCodeAt(tr)===ne||e.charCodeAt(tr)===se);)tr++;if(tr<jt&&e.charCodeAt(tr)===Ve){var bn=ir(e,tr);bn&&!bn.f&&(dr=!0,Hr=er,xr=er,Kr=!0)}}if(!dr){var Wr=ke(e,jt);if(Wr<S){for(var Wt=Wr;Wt<S&&(e.charCodeAt(Wt)===ne||e.charCodeAt(Wt)===se);)Wt++;if(Wt<S&&e.charCodeAt(Wt)===Ve){var wf=ir(e,Wt);wf&&(dr=!0,Hr=jt,xr=Wr,Kr=!0)}}}if(!dr&&r.inHTML){dr=!0,Hr=jt,xr=ke(e,jt);var $f=e.slice(er,jt).trim();Kr=$f.length===0}}var Sn=[],kt="";if(J!==-1){kt=z.slice(D.end-s,J);var xn=kt.trim();if(xn){var{inline:_f,inHTML:Ef,d:jf}=r;r.inHTML=!0,r.d=V+1;var Of=T==="p";if(Of)r.inline=!0,Sn=Tn(xn,!1,r,n);else{var Go=kt.indexOf(`
|
||
|
||
`)!==-1,Jo=ja.test(xn),Qs=dc.test(xn),kf=Go||Jo||r.inHTML&&Qs,Pf=kt.length>=2&&kt.charCodeAt(0)===ce&&kt.charCodeAt(kt.length-1)===ce&&!Go;Pf&&!Jo&&!Qs?Sn=[{type:ee.text,text:xn}]:kf||Qs?(r.inline=!1,Sn=Tr(kt,r,n)):(r.inline=!0,Sn=Tn(xn,!1,r,n))}r.inline=_f,r.inHTML=Ef,r.d=jf}}var Yo=!1;if(l===6&&J!==-1&&!r.inHTML&&!tt){var Nf=/<[a-zA-Z][^>]*>/.test(kt),Ff=kt.indexOf(`
|
||
|
||
`)!==-1||ja.test(kt);Nf&&!Ff&&(Yo=!0)}var If=!Z&&(r.inHTML||l===7||tt||!Kr||Yo);if(If){var Hn,rr,Zo=!1;if(J!==-1&&dr){var Qo=!1;if(r.inHTML&&Y<z.length){for(var Si=Y;Si<z.length&&z.charCodeAt(Si)!==ce;)Si++;var Xs=z.slice(Y,Si).trim();Qo=Xs.length>1&&Xs.charCodeAt(0)===Ve&&Xs.charCodeAt(1)!==Ze}rr=Qo?z.slice(D.end-s):kt,Zo=!0}else(l===7||r.inHTML)&&J!==-1?(rr=z.slice(D.end-s),rr.charCodeAt(0)===ce&&(rr=rr.slice(1))):dr?Hn=e.slice(s,Hr):tt?Hn=j:(rr=z.slice(D.end-s),rr.charCodeAt(0)===ce&&(rr=rr.slice(1)));var Xo=Hn!==void 0,ea=Nt(Hn===void 0?rr||"":Hn),el={type:ee.htmlBlock,tag:H,attrs:nr(D.attrs,H,n),b:D.g+D.b,children:Sn,e:Xo?void 0:ea,j:Xo?ea:void 0,text:ea,c:!0,a:!1};return Zo&&(el.x=!0),{node:el,end:xr}}var tl=Nt(kt);return{node:{type:ee.htmlBlock,tag:H,attrs:nr(D.attrs,H,n),b:D.g+D.b,children:Sn,e:Z?void 0:tl,text:tl,c:!1,a:!1},end:xr}}var xi=j.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),Rf=xi?xi[2]:"div",ta=xi?xi[1]==="/":!1,ra,rl,nl,Ci="";if(ta){var na=j.indexOf(">");na===-1?ra=j:(ra=j.slice(0,na+1),Ci=j.slice(na+1),Ci&&(rl=Nt(Ci)))}else nl=Nt(j);return{node:{type:ee.htmlBlock,tag:Rf,attrs:{},children:[],e:rl,h:ra,j:nl,text:ta?Ci:j,c:!0,a:ta},end:R}}var gt=ir(e,s);if(!gt)return null;var Cr=gt.tag,ia=Cr.toLowerCase(),il=Cr.charCodeAt(0),sa=il>=pe&&il<=ye;if(!(sa||Is.has(ia)||gi.has(ia)||ia.includes("-")))return null;if(gt.f)return{node:{type:ee.htmlSelfClosing,tag:Cr,attrs:{},h:e.slice(s,gt.end),a:!0},end:gt.end};var Cn=uo(e,gt.end,Cr),Wn=[];if(Cn!==-1){var Df=Rs,Ai=e.slice(gt.end,Df),wi=Ai.trim();if(wi){var Tf=Ai.indexOf(`
|
||
|
||
`)!==-1,Mf=ja.test(wi),Uf=dc.test(wi),{inline:qf,inHTML:Lf,d:Vf}=r;r.inHTML=!0,r.d=(r.d||0)+1,Tf||Mf||Uf?(r.inline=!1,Wn=Tr(Ai,r,n)):(r.inline=!0,Wn=Tn(wi,!1,r,n)),r.inline=qf,r.inHTML=Lf,r.d=Vf}var zf=Ue(e,Cn),Bf=e.slice(Cn,zf).trim(),sl=Bf?Cn:ke(e,Cn),al=sa?e.slice(s,Cn):e.slice(s,sl);return{node:{type:ee.htmlBlock,tag:Cr,attrs:nr(gt.attrs,Cr,n),b:gt.g+gt.b,children:Wn,j:Nt(al),text:sa?Ai:al,c:!0,a:!1},end:sl}}var Gn=pc(e,gt.end),Kf=Gn<e.length?ke(e,Gn):Gn,aa=e.slice(gt.end,Gn);if(aa.trim()){var{inline:Hf,inHTML:Wf,d:Gf}=r;r.inline=!1,r.inHTML=!0,r.d=(r.d||0)+1,Wn=Tr(aa,r,n),r.inline=Hf,r.inHTML=Wf,r.d=Gf}var Jf=e.slice(gt.end,Gn);return{node:{type:ee.htmlBlock,tag:Cr,attrs:nr(gt.attrs,Cr,n),b:gt.g+gt.b,children:Wn,e:Nt(Jf),text:aa,c:!0,a:!1},end:Kf}}function Hg(e,t){if(e.charCodeAt(t)!==Ve)return 0;var r=t+1,n=e.length;if(e.charCodeAt(r)===xt&&e.charCodeAt(r+1)===xe&&e.charCodeAt(r+2)===xe)return 2;if(e.charCodeAt(r)===Kn)return 3;if(e.charCodeAt(r)===xt){var i=e.charCodeAt(r+1);if(i>=pe&&i<=ye)return 4;if(e.slice(r+1,r+8)==="[CDATA[")return 5}for(var s=e.charCodeAt(r)===Ze,a=s?r+1:r,o=a;o<n;){var l=e.charCodeAt(o);if(l>=pe&&l<=ye||l>=qe&&l<=He||l>=$e&&l<=_e||l===xe)o++;else break}if(o===a)return 0;var c=e.slice(a,o);if(gi.has(c.toLowerCase())){if(s)return 0;var u=e.charCodeAt(o);return u===ne||u===se||u===Ee||u===ce||o>=n?1:0}if(Is.has(c.toLowerCase())){if(s){for(var d=o;d<n&&(e.charCodeAt(d)===ne||e.charCodeAt(d)===se);)d++;return d<n&&e.charCodeAt(d)===Ee?6:0}var h=o<n?e.charCodeAt(o):-1;return h===ne||h===se||h===Ee||h===ce||h===Ze||h===-1?6:0}if(s){for(var m=o;m<n&&(e.charCodeAt(m)===ne||e.charCodeAt(m)===se);)m++;if(m<n&&e.charCodeAt(m)===Ee){var g=Ue(e,t),b=e.slice(m+1,g).trim();if(b==="")return 7}}else{var v=Ue(e,t),y=ir(e,t);if(y&&y.end<=v){var f=e.slice(y.end,v).trim();if(f==="")return 7}}return 0}function Cc(e,t,r){for(var n=0,i=e.length;n<i&&(e.charCodeAt(n)===ne||e.charCodeAt(n)===se);)n++;for(;i>n&&(e.charCodeAt(i-1)===ne||e.charCodeAt(i-1)===se);)i--;n<i&&e.charCodeAt(n)===ct&&n++,i>n&&e.charCodeAt(i-1)===ct&&(i-2<n||e.charCodeAt(i-2)!==st)&&i--;for(var s=[],a=n,o=!1,l=[],c=n;c<i;){var u=e.charCodeAt(c);if(u===st&&c+1<i){e.charCodeAt(c+1)===ct?(o||(o=!0,l=[]),l.push(e.slice(a,c)),l.push("|"),c+=2,a=c):c+=2;continue}if(u===Me){for(var d=0;c<i&&e.charCodeAt(c)===Me;)d++,c++;for(var h=!1;c<i&&!h;){for(var m=0;c<i&&e.charCodeAt(c)===Me;)m++,c++;m===d?h=!0:m===0&&c++}continue}if(u===ct){var g=o?(l.push(e.slice(a,c)),l.join("")):e.slice(a,c);s.push(g.trim()),c++,a=c,o=!1,l=[];continue}c++}var b=o?(l.push(e.slice(a,i)),l.join("")):e.slice(a,i);return s.push(b.trim()),s.map(v=>{var y=v.indexOf("\\|")===-1?v:v.replace(/\\\|/g,"|");return y?Tn(y,!1,t,r):[]})}function Ac(e,t,r,n){let i=Ue(e,t);var s=e.indexOf("|",t);if(s<0||s>=i)return null;let a=ke(e,i);if(a>=e.length)return null;let o=Ue(e,a);if(!nf(e,a,o))return null;let l=e.slice(t,i),c=e.slice(a,o);for(var u=[],d=0,h=c.length;d<h&&(c.charCodeAt(d)===ne||c.charCodeAt(d)===se);)d++;for(d<h&&c.charCodeAt(d)===ct&&d++;d<h;){for(;d<h&&(c.charCodeAt(d)===ne||c.charCodeAt(d)===se);)d++;if(d>=h||c.charCodeAt(d)===ct)break;var m=c.charCodeAt(d)===St;for(m&&d++;d<h&&c.charCodeAt(d)===xe;)d++;var g=d<h&&c.charCodeAt(d)===St;for(g&&d++,u.push(m&&g?"center":g?"right":m?"left":null);d<h&&(c.charCodeAt(d)===ne||c.charCodeAt(d)===se);)d++;d<h&&c.charCodeAt(d)===ct&&d++}let b=Cc(l,r,n);if(u.length!==b.length)return null;let v=[],y=ke(e,o);for(;y<e.length;){let $=Ue(e,y),k=e.slice(y,$);if(_t(e,y,$))break;if(nt(e,y,$),De<4){var f=e.charCodeAt(y+Ie);if(f===Ee||f===Ht||(f===xe||f===Xe||f===Je)&&Dr(e,y))break;if(f===Me||f===ot){for(var A=y+Ie,O=0;A<$&&e.charCodeAt(A)===f;)O++,A++;if(O>=3)break}}v.push(Cc(k,r,n)),y=ke(e,$)}if(n.optimizeForStreaming&&v.length===0)return null;for(var p=b.length,x=0;x<v.length;x++)if(v[x].length<p)for(;v[x].length<p;)v[x].push([]);else v[x].length>p&&(v[x].length=p);return{node:{type:ee.table,header:b,cells:v,align:u},end:y}}function Wg(e,t,r){var n=Ue(e,t);if(nt(e,t,n),De>3)return null;var i=t+Ie;if(e.charCodeAt(i)!==Be)return null;if(i+1<e.length&&e.charCodeAt(i+1)===br){var s=Gg(e,i,r);return s||null}r.refs||(r.refs=Object.create(null));var a=sf(e,i,r.refs);return a===null?null:{node:{type:ee.refCollection},end:a}}function Gg(e,t,r){var n=e.length;if(e.charCodeAt(t)!==Be||t+1>=n||e.charCodeAt(t+1)!==br)return null;for(var i=t+2,s=i;i<n&&e.charCodeAt(i)!==Rt;){if(e.charCodeAt(i)===ce)return null;i++}if(i>=n)return null;var a=`^${e.slice(s,i)}`.toLowerCase();if(i++,i>=n||e.charCodeAt(i)!==St)return null;for(i++;i<n&&(e.charCodeAt(i)===ne||e.charCodeAt(i)===se);)i++;if(i<n&&e.charCodeAt(i)===ce)for(i++;i<n&&(e.charCodeAt(i)===ne||e.charCodeAt(i)===se);)i++;var o=e.indexOf(`
|
||
`,i);o<0&&(o=n);for(var l=e.slice(i,o).trim(),c=o<n?o+1:n;c<n;){var u=Ue(e,c);if(nt(e,c,u),De>=2&&!_t(e,c,u))l+=`
|
||
${e.slice(c,u)}`,c=ke(e,u);else if(_t(e,c,u)){var d=ke(e,u);if(d<n){var h=Ue(e,d);if(nt(e,d,h),De>=2){l+=`
|
||
`,c=ke(e,u);continue}}break}else break}var m=r.refs;return m&&!m[a]&&(m[a]={target:l,title:void 0}),{node:{type:ee.footnote},end:c}}function Jg(e,t,r,n){let i=t,s=0,a=0,o=-1;for(;i<e.length;){let M=o>=0?o:Ue(e,i);if(o=-1,_t(e,i,M))break;if(nt(e,i,M),De<4&&a>0&&!r.l){let K=e.charCodeAt(i+Ie);if(K===Vt||K===xe){let B=i+Ie;for(;B<M&&e.charCodeAt(B)===K;)B++;for(;B<M&&(e.charCodeAt(B)===ne||e.charCodeAt(B)===se);)B++;if(B>=M){s=K===Vt?1:2,i=ke(e,M);break}}}a=M;let L=ke(e,M);if(L<e.length){if(e.charCodeAt(L)===io){var l=Ue(e,L);i=ke(e,l),a=l;continue}let K=Ue(e,L);if(o=K,nt(e,L,K),De<4){let B=e.charCodeAt(L+Ie);if(B===Ee){i=L;break}if(B===Ht){for(var c=L+Ie,u=0;c<K&&e.charCodeAt(c)===Ht&&u<=6;)u++,c++;if(u>=1&&u<=6&&(c>=K||e.charCodeAt(c)===ne||e.charCodeAt(c)===se)){i=L;break}}if(B===Me||B===ot){for(var d=L+Ie,h=0;d<K&&e.charCodeAt(d)===B;)h++,d++;if(h>=3){i=L;break}}if(B===Ve){var m=L+Ie+1,g=m<K?e.charCodeAt(m):0,b=g===xt||g===Kn;if(!b&&g===Ze){for(var v=m+1,y=v;y<K&&(e.charCodeAt(y)>=pe&&e.charCodeAt(y)<=ye||e.charCodeAt(y)>=qe&&e.charCodeAt(y)<=He||e.charCodeAt(y)>=$e&&e.charCodeAt(y)<=_e||e.charCodeAt(y)===xe);)y++;y>v&&(b=Is.has(e.slice(v,y).toLowerCase()))}else if(!b){for(var f=m;f<K&&(e.charCodeAt(f)>=pe&&e.charCodeAt(f)<=ye||e.charCodeAt(f)>=qe&&e.charCodeAt(f)<=He||e.charCodeAt(f)>=$e&&e.charCodeAt(f)<=_e||e.charCodeAt(f)===xe);)f++;if(f>m){var A=e.slice(m,f).toLowerCase();b=Is.has(A)||gi.has(A)}}if(b&&of(e,L,r,n)){i=L;break}}if(B===xe||B===Xe||B===qr){let Q=L+Ie+1;if(Q<K&&(e.charCodeAt(Q)===ne||e.charCodeAt(Q)===se)){var O=fi(e,Q,K);if(O<K&&!Dr(e,L)){i=L;break}}}if(B>=$e&&B<=_e){let Q=L+Ie;for(;Q<K&&e.charCodeAt(Q)>=$e&&e.charCodeAt(Q)<=_e;)Q++;if(Q<K&&(e.charCodeAt(Q)===zt||e.charCodeAt(Q)===Bt)&&Q-(L+Ie)===1&&e.charCodeAt(L+Ie)===49){var p=Q+1;if(p<K&&(e.charCodeAt(p)===ne||e.charCodeAt(p)===se)){var x=fi(e,p,K);if(x<K){i=L;break}}}}if(B===ct){let Q=ke(e,K);if(Q<e.length){let X=Ue(e,Q);if(nf(e,Q,X)){i=L;break}}}if((B===xe||B===Xe||B===Je)&&Dr(e,L)){if(B!==xe){i=L;break}let Q=L+Ie;for(;Q<K&&e.charCodeAt(Q)===xe;)Q++;for(;Q<K&&(e.charCodeAt(Q)===ne||e.charCodeAt(Q)===se);)Q++;if(Q<K){i=L;break}}}}i=ke(e,M)}for(var $=s?a:i;$>t&&(e.charCodeAt($-1)===ce||e.charCodeAt($-1)===Ur||e.charCodeAt($-1)===ne||e.charCodeAt($-1)===se);)$--;for(var k=t;k<$&&(e.charCodeAt(k)===ne||e.charCodeAt(k)===se);)k++;if(k>=$)return null;for(var N=!1,I=k;I<$;I++)if(e.charCodeAt(I)===io){N=!0;break}var U=N?e.slice(k,$).replace(/\u001E/g,""):e.slice(k,$);if(!U)return null;let q=Tn(U,!0,r,n);return s?{node:{type:ee.heading,level:s,children:q,id:""},end:i}:{node:{type:ee.paragraph,children:q},end:i}}function Tn(e,t,r,n){var i=r.t;if(!i){var s=r.k;r.k=t;var a=ar(e,0,e.length,r,n);return r.k=s,a}var o=[];return i.push({dest:o,text:e,breaks:t,inline:r.inline,inAnchor:r.inAnchor,inHTML:r.inHTML,htmlDepth:r.d,inList:r.inList,inBlockQuote:r.inBlockQuote,noSetext:r.l,depth:r.o}),o}function Yg(e,t,r){if(e.charCodeAt(t)!==Me)return null;let n=Lr(e,t,r,96),i=t+n;for(;i<r;){let s=e.indexOf("`",i);if(s<0||s>=r)return null;let a=Lr(e,s,r,96);if(a===n){let o=e.slice(t+n,s);return o.indexOf(`
|
||
`)!==-1&&(o=o.replace(/\n/g," ")),o.length>0&&o[0]===" "&&o.at(-1)===" "&&o.trim().length>0&&(o=o.slice(1,-1)),{node:{type:ee.codeInline,text:o},end:s+a}}i=s+a}return null}function Vo(e,t,r){if(e.charCodeAt(t)!==Me)return t;let n=Lr(e,t,r,96),i=t+n;for(;i<r;){let s=e.indexOf("`",i);if(s<0||s>=r)return t;let a=Lr(e,s,r,96);if(a===n)return s+a;i=s+a}return t}function Zg(e,t,r){if(e.charCodeAt(t)!==Ve)return t;if(t+1<r&&e.charCodeAt(t+1)===Ze){let c=t+2;for(;c<r&&e.charCodeAt(c)!==Ee;)c++;return c<r?c+1:t}if(t+3<r&&e.charCodeAt(t+1)===xt&&e.charCodeAt(t+2)===xe&&e.charCodeAt(t+3)===xe){let c=e.indexOf("-->",t+4);return c>=0?c+3:t}let n=t+1,i=n;for(;n<r;){let c=e.charCodeAt(n);if(c>=pe&&c<=ye||c>=qe&&c<=He||c>=$e&&c<=_e||c===xe)n++;else break}if(n===i)return t;let s=e.slice(i,n).toLowerCase(),a=!1;for(;n<r;){let c=e.charCodeAt(n);if(c===Ee){n++;break}if(c===Ze&&n+1<r&&e.charCodeAt(n+1)===Ee){n+=2,a=!0;break}if(c===hn||c===fn){var o=c;for(n++;n<r&&e.charCodeAt(n)!==o;)n++;n<r&&n++;continue}if(c===ce)return t;n++}if(a||yi(s))return n;let l=1;for(;n<r&&l>0;)if(e.charCodeAt(n)===Ve)if(n+1<r&&e.charCodeAt(n+1)===Ze){let c=n+2,u=c;for(;u<r&&(e.charCodeAt(u)>=pe&&e.charCodeAt(u)<=ye||e.charCodeAt(u)>=qe&&e.charCodeAt(u)<=He);)u++;if(e.slice(c,u).toLowerCase()===s){for(;u<r&&e.charCodeAt(u)!==Ee;)u++;if(u<r&&u++,l--,l===0)return u}n=u}else{let c=n+1,u=c;for(;u<r&&(e.charCodeAt(u)>=pe&&e.charCodeAt(u)<=ye||e.charCodeAt(u)>=qe&&e.charCodeAt(u)<=He);)u++;e.slice(c,u).toLowerCase()===s&&l++,n++}else n++;return n}function Qg(e,t,r){let n=e.charCodeAt(t)===xt?t+1:t;if(e.charCodeAt(n)!==Be)return t;let i=1,s=n+1;for(;s<r&&i>0;){let o=e.charCodeAt(s);if(o===st&&s+1<r){s+=2;continue}o===Be?i++:o===Rt&&i--,s++}if(i!==0||s>=r)return t;let a=e.charCodeAt(s);if(a===Ft){let o=1;for(s++;s<r&&o>0;){let l=e.charCodeAt(s);if(l===st&&s+1<r){s+=2;continue}l===Ft?o++:l===Bt&&o--,s++}return o===0?s:t}if(a===Be){let o=1;for(s++;s<r&&o>0;){let l=e.charCodeAt(s);l===Be?o++:l===Rt&&o--,s++}return o===0?s:t}return t}function Xg(e,t,r,n,i){if(e.charCodeAt(t)!==ot||t+1>=r||e.charCodeAt(t+1)!==ot)return null;let s=t+2;for(;s+1<r;){let a=e.charCodeAt(s);if(a===Me){let o=Vo(e,s,r);if(o>s){s=o;continue}}if(a===ot&&e.charCodeAt(s+1)===ot){let o=e.slice(t+2,s),l=ar(o,0,o.length,n,i);return{node:{type:ee.textFormatted,tag:"del",children:l},end:s+2}}a===st&&s+1<r&&s++,s++}return null}function e0(e,t,r,n,i){if(e.charCodeAt(t)!==Vt||t+1>=r||e.charCodeAt(t+1)!==Vt)return null;let s=t+2;for(;s+1<r;){let a=e.charCodeAt(s);if(a===Me){let o=Vo(e,s,r);if(o>s){s=o;continue}}if(a===Vt&&e.charCodeAt(s+1)===Vt&&s>t+2){let o=e.slice(t+2,s),l=ar(o,0,o.length,n,i);return{node:{type:ee.textFormatted,tag:"mark",children:l},end:s+2}}a===st&&s+1<r&&s++,s++}return null}function wc(e,t,r){return e<Ws?!!(Lo(e)&Nn):dg.test(t[r])}function $c(e,t,r){return e<Ws?!!(Lo(e)&tn):fg.test(t[r])}function t0(e,t,r){var n=e.charCodeAt(t);if(n!==Xe&&n!==Je)return null;var i=Lr(e,t,r,n);if(i===0)return null;var s=t>0?e.charCodeAt(t-1):32,a=t+i<r?e.charCodeAt(t+i):32,o=$c(s,e,t-1),l=$c(a,e,t+i),c=t>0?wc(s,e,t-1):!1,u=t+i<r?wc(a,e,t+i):!1,d=!l&&(!u||o||c),h=!o&&(!c||l||u),m,g;return n===Xe?(m=d,g=h):(m=d&&(!h||c),g=h&&(!d||u)),{len:i,canOpen:m,canClose:g}}function r0(e,t,r,n){if(t.length!==0){for(var i=e.length,s=Array(i),a=null,o=null,l=0;l<i;l++){var c={node:e[l],prev:o,next:null};o?o.next=c:a=c,s[l]=c,o=c}for(var u=Array(t.length),d=0;d<t.length;d++)u[d]=s[t[d].idx];for(var h=[],m=0;m<12;m++)h[m]=-1;for(var g=0;g<t.length;){var b=t[g];if(!(b.active&&b.canClose)){g++;continue}for(var v=b.ch===Xe?0:1,y=v*6+b.len%3*2+(b.canOpen?1:0),f=h[y]===void 0?-1:h[y],A=-1,O=g-1;O>f;O--){var p=t[O];if(!(!p.active||p.ch!==b.ch||!p.canOpen)&&!((b.canOpen||p.canClose)&&(p.len+b.len)%3===0&&p.len%3!==0)){A=O;break}}if(A<0){h[y]=g-1,!b.canOpen&&(b.active=!1),g++;continue}var x=t[A],$=x.len>=2&&b.len>=2,k=$?2:1;x.len-=k,b.len-=k;var N=u[A],I=u[g],U=N.node,q=I.node;U.text=U.text.slice(0,U.text.length-k),q.text=q.text.slice(k);for(var M=[],L=N.next;L&&L!==I;)M.push(L.node),L=L.next;var K={type:ee.textFormatted,tag:$?"strong":"em",children:M},B={node:K,prev:N,next:I};N.next=B,I.prev=B;for(var Q=A+1;Q<g;Q++)t[Q].active=!1;if(x.len===0&&(x.active=!1,U.text==="")){var X=N.prev;B.prev=X,X?X.next=B:a=B}if(b.len===0){if(b.active=!1,q.text===""){var re=I.next;B.next=re,re&&(re.prev=B)}}else continue;g++}for(var E=0,_=a;_;){var P=_.node;if(P.type===ee.text){var C=P;if(C.text===""){_=_.next;continue}if(E>0&&e[E-1].type===ee.text){e[E-1].text+=C.text,_=_.next;continue}}e[E++]=P,_=_.next}e.length=E}}function Ei(e,t,r,n){return t(e,r,n)===null?null:e}var _c=0,fo=0,Ec=0,ho=0,jc=0,mo=0,Oa=0,Ut=0;function n0(){return Oa===2147483647&&(fo=0,ho=0,mo=0,As=0,Oa=0),++Oa}var ka=null,As=0,ji=[],Pa=256;function Oc(e,t,r,n,i){let s=e.charCodeAt(t)===xt,a=s?t+1:t;if(e.charCodeAt(a)!==Be||ho===Ut&&a>=Ec)return null;var o=As===Ut?ka:null,l=o===null?0:o[a];if(l<0)return null;var c=l;if(l===0){var u=e.indexOf("]",a+1);if(u<0||u>=r)return Ec=a,ho=Ut,null;c=a+1;var d=0;ji[d++]=a;for(var h=r-a>=Pa;c<r&&d>0;){var m=e.charCodeAt(c);if(m===st&&c+1<r){c+=2;continue}if(m===Me){var g=Vo(e,c,r);if(g>c){c=g;continue}}if(m===Ve){var b=lf(e,c,r);if(b){c=b.end;continue}var v=Zg(e,c,r);if(v>c){c=v;continue}}if(m===Be)ji[d++]=c;else if(m===Rt){var y=ji[--d];o===null&&h&&c-a>=Pa&&(o=ka=new Int32Array(r),As=Ut),o!==null&&(o[y]=c+1)}c++}if(d>0){if(o===null&&h&&c-a>=Pa&&(o=ka=new Int32Array(r),As=Ut),o!==null)for(;d>0;)o[ji[--d]]=-1;return null}}var f=c-1,A=e.slice(a+1,f),O=c<r?e.charCodeAt(c):0,p=!1;if(O===Ft){var x=!0;for(c++;c<r&&(e.charCodeAt(c)===ne||e.charCodeAt(c)===ce);)c++;var $="",k=c;if(c<r&&e.charCodeAt(c)===Ve){for(c++,k=c;k<r&&e.charCodeAt(k)!==Ee;){if(e.charCodeAt(k)===st&&k+1<r){k+=2;continue}if(e.charCodeAt(k)===ce){x=!1;break}k++}x&&(k>=r||e.charCodeAt(k)!==Ee)&&(x=!1),x&&($=e.slice(c,k),k++)}else if(x){var N=fo===Ut?_c:-1;if(N>=0&&c>=N)x=!1;else{for(var I=0,U=!1;k<r;){var q=e.charCodeAt(k);if(q===st&&k+1<r){k+=2;continue}if(q===Ft)I++;else if(q===Bt){if(U=!0,I===0)break;I--}else if(q===ne||q===ce)break;k++}k>=r&&!U&&(N<0||c<N)&&(_c=c,fo=Ut),$=e.slice(c,k)}}if(x){for(c=k;c<r&&(e.charCodeAt(c)===ne||e.charCodeAt(c)===ce);)c++;var M;if(c<r){var L=e.charCodeAt(c);if(L===hn||L===fn||L===Ft){var K=L===Ft?41:L;c++;for(var B=c;c<r&&e.charCodeAt(c)!==K;)e.charCodeAt(c)===st&&c+1<r&&c++,c++;c>=r?x=!1:(M=e.slice(B,c),c++)}}if(x){for(;c<r&&(e.charCodeAt(c)===ne||e.charCodeAt(c)===ce);)c++;(c>=r||e.charCodeAt(c)!==Bt)&&(x=!1)}}if(x){if(c++,$=Rr(Dn($)),M!==void 0&&(M=Rr(Dn(M))),s){var Q=ar(A,0,A.length,n,i),X=Ds(Q);return{node:{type:ee.image,target:Ei($,i?.sanitizer||pr,"img","src"),alt:X,title:M},end:c}}var re=n.inAnchor;n.inAnchor=!0;var D=re?[{type:ee.text,text:A}]:ar(A,0,A.length,n,i);return n.inAnchor=re,!n.inAnchor&&po(D)?null:{node:{type:ee.link,target:Ei($,i?.sanitizer||pr,"a","href"),title:M,children:D},end:c}}c=f+1,p=!0}var E="",_=c;if(!p&&O===Be){var P=c+1;_=P;for(var C=!1;_<r&&e.charCodeAt(_)!==Rt;){if(e.charCodeAt(_)===st&&_+1<r){_+=2;continue}if(e.charCodeAt(_)===Be){C=!0;break}_++}if(C||_>=r)return null;var S=e.slice(P,_);if(S.trim())E=xs(S);else{if(mc(A))return null;E=xs(A)}_+=1}else{if(mc(A))return null;E=xs(A)}var j=n.refs?.[E];if(!j)return null;if(s)return{node:{type:ee.image,target:Ei(j.target,i?.sanitizer||pr,"img","src"),alt:Ds(ar(A,0,A.length,n,i)),title:j.title},end:_};var R=n.inAnchor;n.inAnchor=!0;var D=R?[{type:ee.text,text:A}]:ar(A,0,A.length,n,i);return n.inAnchor=R,!n.inAnchor&&po(D)?null:{node:{type:ee.link,target:Ei(j.target,i?.sanitizer||pr,"a","href"),title:j.title,children:D},end:_}}function lf(e,t,r){if(e.charCodeAt(t)!==Ve)return null;for(var n=t+1;n<r;){var i=e.charCodeAt(n);if(i===Ee)break;if(i===ne||i===ce||i===Ur||i===Ve)return null;n++}if(n>=r||e.charCodeAt(n)!==Ee)return null;var s=e.slice(t+1,n),a=s.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/);return a?{node:{type:ee.link,target:s,title:void 0,children:[{type:ee.text,text:s}]},end:n+1}:s.indexOf("@")!==-1&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(s)?{node:{type:ee.link,target:`mailto:${s}`,title:void 0,children:[{type:ee.text,text:s}]},end:n+1}:null}function i0(e,t,r,n){if(e.charCodeAt(t)!==Be||t+1>=r||e.charCodeAt(t+1)!==br||mo===Ut&&t>=jc)return null;let i=t+2;for(;i<r&&e.charCodeAt(i)!==Rt&&e.charCodeAt(i)!==ce;)i++;if(i>=r)return jc=t,mo=Ut,null;if(e.charCodeAt(i)!==Rt)return null;let s=e.slice(t+2,i);return s?{node:{type:ee.footnoteReference,target:`#${pn(s)}`,text:s},end:i+1}:null}function s0(e,t,r,n){if(n.disableBareUrls)return null;var i="",s=!1,a=e.charCodeAt(t);if(a===Ps||a===72?t+8<=r&&e.charCodeAt(t+1)===Rn&&e.charCodeAt(t+2)===Rn&&e.charCodeAt(t+3)===no&&(e.charCodeAt(t+4)===Yd&&e.charCodeAt(t+5)===St&&e.charCodeAt(t+6)===Ze&&e.charCodeAt(t+7)===Ze?i="https://":e.charCodeAt(t+4)===St&&e.charCodeAt(t+5)===Ze&&e.charCodeAt(t+6)===Ze&&(i="http://")):a===dn||a===70?t+6<=r&&e.charCodeAt(t+1)===Rn&&e.charCodeAt(t+2)===no&&e.charCodeAt(t+3)===St&&e.charCodeAt(t+4)===Ze&&e.charCodeAt(t+5)===Ze&&(i="ftp://"):(a===ln||a===87)&&t+4<=r&&e.charCodeAt(t+1)===ln&&e.charCodeAt(t+2)===ln&&e.charCodeAt(t+3)===zt&&(i="www.",s=!0),!i)return null;let o=t+i.length;for(;o<r;){let x=e.charCodeAt(o);if(x===ne||x===ce||x===se||x===Ur||x===Ve||x===Ee)break;o++}for(var l=0,c=0,u=t;u<o;u++){var d=e.charCodeAt(u);d===Ft?l++:d===Bt&&c++}let h=o;for(;h>t+i.length;){let x=e.charCodeAt(h-1);if(x===zt||x===Qy||x===St||x===xt||x===Kn||x===Bt||x===Xe||x===Je||x===ot){if(x===Bt){if(l>=c)break;c--}h--}else if(x===Ns){for(var m=h-2;m>t&&(e.charCodeAt(m)>=pe&&e.charCodeAt(m)<=ye||e.charCodeAt(m)>=qe&&e.charCodeAt(m)<=He||e.charCodeAt(m)>=$e&&e.charCodeAt(m)<=_e);)m--;m>=t&&e.charCodeAt(m)===Hs?h=m:h--}else break}if(h<=t+i.length)return null;var g=t+(s?4:i.length),b=e.indexOf("/",g);if((b<0||b>h)&&(b=h),s&&e.indexOf(".",g)===-1)return null;for(var v=-1,y=-1,f=b-1;f>=g;f--)if(e.charCodeAt(f)===zt)if(v<0)v=f;else{y=f;break}for(var A=y>=0?y+1:g,f=A;f<b;f++)if(e.charCodeAt(f)===Je)return null;var O=e.slice(t,h),p=s?`http://${O}`:O;return{node:{type:ee.link,target:p,title:void 0,children:[{type:ee.text,text:O}]},end:h}}function a0(e,t,r,n){if(n.disableBareUrls)return null;for(var i=t,s=i;i<r;){var a=e.charCodeAt(i);if(a>=pe&&a<=ye||a>=qe&&a<=He||a>=$e&&a<=_e||a===zt||a===xt||a===Ht||a===36||a===to||a===Hs||a===fn||a===Xe||a===qr||a===Ze||a===Vt||a===Kn||a===br||a===Je||a===Me||a===mn||a===ct||a===Uo||a===ot||a===xe)i++;else break}if(i===s||i>=r||e.charCodeAt(i)!==Jd)return null;i++;for(var o=i,l=-1,c=i;i<r;){var a=e.charCodeAt(i);if(a>=pe&&a<=ye||a>=qe&&a<=He||a>=$e&&a<=_e)i++;else if((a===xe||a===Je)&&i>o)i++;else if(a===zt){if(i===o)break;var u=e.charCodeAt(i-1);if(u===xe||u===Je||i-c>63)break;if(i+1<r){var d=e.charCodeAt(i+1);if(d>=pe&&d<=ye||d>=qe&&d<=He||d>=$e&&d<=_e)l=i,c=i+1,i++;else break}else break}else break}if(i-c>63||l<0)return null;var h=e.charCodeAt(i-1);if(!(h>=pe&&h<=ye||h>=qe&&h<=He||h>=$e&&h<=_e)||i<=l+1)return null;for(var m=-1,g=l-1;g>=o;g--)if(e.charCodeAt(g)===zt){m=g;break}for(var b=m>=0?m+1:o,g=b;g<i;g++)if(e.charCodeAt(g)===Je)return null;var v=e.slice(t,i);return{node:{type:ee.link,target:`mailto:${v}`,title:void 0,children:[{type:ee.text,text:v}]},end:i}}function po(e){for(var t=0;t<e.length;t++)if(e[t].type===ee.link||"children"in e[t]&&Array.isArray(e[t].children)&&po(e[t].children))return!0;return!1}function Ds(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];i.type===ee.text?r+=i.text:i.type===ee.breakLine?r+=" ":i.type===ee.codeInline||i.type===ee.footnoteReference?r+=i.text:"children"in i&&Array.isArray(i.children)?r+=Ds(i.children,t):!t&&i.type===ee.image&&(r+=i.alt||"")}return r}function yo(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.type===ee.heading){var s=i;s.id=Ug(r(Ds(s.children,!0)),t)}if("children"in i){var a=i.children;Array.isArray(a)&&yo(a,t,r)}if((i.type===ee.orderedList||i.type===ee.unorderedList)&&Array.isArray(i.items))for(var o=i.items,l=0;l<o.length;l++)yo(o[l],t,r)}}function Zr(e){return{type:ee.text,text:e}}function o0(e,t,r){var n=t+1;if(n>=r)return-1;if(e.charCodeAt(n)===Ht){n++;var i=n<r&&(e.charCodeAt(n)===Zd||e.charCodeAt(n)===Qd);i&&n++;for(var s=n,a=i?6:7;n<r&&n-s<=a;){var o=e.charCodeAt(n),l=o>=$e&&o<=_e||i&&(o>=pe&&o<=ro||o>=qe&&o<=dn);if(!l)break;n++}return n===s||n-s>a?-1:n<r&&e.charCodeAt(n)===Ns?n+1:-1}for(var c=n;n<r&&n-c<48;){var u=e.charCodeAt(n);if(u>=pe&&u<=ye||u>=qe&&u<=He||u>=$e&&u<=_e){n++;continue}break}return n===c?-1:n<r&&e.charCodeAt(n)===Ns?n+1:-1}function l0(e,t,r,n,i){if(e.charCodeAt(t)!==Ve)return null;var s=t+1;if(s>=r)return null;var a=e.charCodeAt(s);if(a===xt&&s+1<r&&e.charCodeAt(s+1)===xe&&s+2<r&&e.charCodeAt(s+2)===xe){var o=s+3;if(o<r&&e.charCodeAt(o)===Ee)return{node:{type:ee.htmlComment,text:"",s:!0},end:o+1};if(o+1<r&&e.charCodeAt(o)===xe&&e.charCodeAt(o+1)===Ee)return{node:{type:ee.htmlComment,text:"-",s:!0},end:o+2};var l=e.indexOf("-->",o);return l!==-1&&l<=r-3?{node:{type:ee.htmlComment,text:e.slice(t+4,l),s:!1},end:l+3}:null}if(a===Kn){var c=e.indexOf("?>",s+1);return c!==-1&&c<r?{node:{type:ee.htmlSelfClosing,tag:"?",attrs:{},m:e.slice(t,c+2),a:!1},end:c+2}:null}if(a===xt&&s+1<r){var u=e.charCodeAt(s+1);if(u===Be&&e.slice(s+1,s+8)==="[CDATA["){var d=e.indexOf("]]>",s+8);return d!==-1&&d<r?{node:{type:ee.htmlSelfClosing,tag:"![CDATA[",attrs:{},m:e.slice(t,d+3),a:!1},end:d+3}:null}if(u>=pe&&u<=ye){var h=e.indexOf(">",s+2);return h!==-1&&h<r?{node:{type:ee.htmlSelfClosing,tag:`!${e.slice(s+1,h)}`,attrs:{},m:e.slice(t,h+1),a:!1},end:h+1}:null}}if(a===Ze){var m=s+1;if(m>=r)return null;var g=e.charCodeAt(m);if(!(g>=pe&&g<=ye||g>=qe&&g<=He))return null;for(m++;m<r;){var b=e.charCodeAt(m);if(b>=pe&&b<=ye||b>=qe&&b<=He||b>=$e&&b<=_e||b===xe)m++;else break}for(;m<r&&(e.charCodeAt(m)===ne||e.charCodeAt(m)===se||e.charCodeAt(m)===ce);)m++;if(m<r&&e.charCodeAt(m)===Ee){var v=e.slice(s+1,m).trim();return{node:{type:ee.htmlSelfClosing,tag:v,attrs:{},h:e.slice(t,m+1),a:!0},end:m+1}}return null}if(!(a>=pe&&a<=ye||a>=qe&&a<=He))return null;var y=ir(e,t);if(!y)return null;var f=y.tag,A=f.toLowerCase(),O=y.n;if(O||yi(f))return{node:{type:ee.htmlSelfClosing,tag:f,attrs:nr(y.attrs,f,i),m:y.q?oo(y):e.slice(t,y.end),a:!1},end:y.end};var p=gi.has(A),x=uo(e.slice(0,r),y.end,f);if(x===-1)return{node:{type:ee.htmlSelfClosing,tag:f,attrs:nr(y.attrs,f,i),m:y.q?oo(y):e.slice(t,y.end),a:!1},end:y.end};var $=Kg(e,`</${A}`,x),k=e.slice(y.end,$);if(p){var N=Nt(k);return{node:{type:ee.htmlBlock,tag:f,attrs:nr(y.attrs,f,i),b:y.g+y.b,children:[],e:N||void 0,h:e.slice($,x),text:N,c:!0,a:!1},end:x}}var I=[],U=k.trim();if(U){var{inAnchor:q,inline:M,k:L}=n;A==="a"&&(n.inAnchor=!0),n.k=!1;var K=U.indexOf(`
|
||
|
||
`)!==-1||/^#{1,6}\s/.test(U);K?(n.inline=!1,I=Tr(U,n,i)):I=ar(U,0,U.length,n,i),n.inAnchor=q,n.inline=M,n.k=L}return{node:{type:ee.htmlBlock,tag:f,attrs:nr(y.attrs,f,i),b:y.b,children:I,text:Nt(k),c:!1,a:!1},end:x}}var c0=200,oi=0;function ar(e,t,r,n,i){if(oi++,oi>c0)return oi--,[{type:ee.text,text:e.slice(t,r)}];var s=Ut;Ut=n0();let a=n;if(i.optimizeForStreaming){let Se=function(Ge,At){for(var ut=1,dt=At+1;dt<Ge.length;dt++){var ft=Ge.charCodeAt(dt);if(ft===Be)ut++;else if(ft===Rt&&(ut--,ut===0))return dt}return-1},oe=e.slice(t,r),Ne=oe;for(var o=0,l=0,c=0,u=0,d=0,h=-1,m=-1,g=-1,b=-1,v=-1,y=0;y<oe.length;y++){var f=oe.charCodeAt(y);if(f===Be){var A=Qg(oe,y,oe.length);if(A>y){y=A-1;continue}}f===Xe?y+1<oe.length&&oe.charCodeAt(y+1)===Xe?(o++,h=y,y++):(l++,m=y):f===Je?y+1<oe.length&&oe.charCodeAt(y+1)===Je?(c++,g=y,y++):(u++,b=y):f===ot&&y+1<oe.length&&oe.charCodeAt(y+1)===ot&&(d++,v=y,y++)}var O=[];d%2===1&&v>=0&&O.push([v,2]),c%2===1&&g>=0&&O.push([g,2]),u%2===1&&b>=0&&O.push([b,1]),o%2===1&&h>=0&&O.push([h,2]),l%2===1&&m>=0&&O.push([m,1]),O.sort((Ge,At)=>At[0]-Ge[0]);for(var p=0;p<O.length;p++){var x=O[p][0],$=O[p][1];oe=oe.slice(0,x)+oe.slice(x+$)}let Ct=0,et=-1;for(let Ge=0;Ge<oe.length;Ge++)oe.charCodeAt(Ge)===Me&&(Ct++,et=Ge);if(Ct%2===1&&et!==-1){let Ge=!1,At=-1,ut=0;for(;ut<oe.length;)oe.charCodeAt(ut)===Me&&(Ge?(Ge=!1,At=-1):(At=ut,Ge=!0)),ut++;Ge&&At!==-1&&(oe=oe.slice(0,At))}for(var k=!0;k;){k=!1;for(var N=-1,I=-1,U=-1,q=!1,M=0;M<oe.length;M++){var L=oe.charCodeAt(M);if(L===Be&&(M===0||oe.charCodeAt(M-1)!==st)){var K=M>0&&oe.charCodeAt(M-1)===xt,B=K?M-1:M,Q=Se(oe,M);if(Q===-1)N=B,q=K,I=M+1,U=oe.length;else{var X=Q+1;if(X>=oe.length)N=B,q=K,I=M+1,U=Q;else if(oe.charCodeAt(X)===Ft){var re=oe.indexOf(")",X+1);re===-1?(N=B,q=K,I=M+1,U=Q,M=oe.length):M=re}else if(oe.charCodeAt(X)===Be){var E=oe.indexOf("]",X+1);E===-1?(N=B,q=K,I=M+1,U=Q,M=oe.length):M=E}else M=Q}}}if(N>=0){var _=q?"":oe.slice(I,U);oe=oe.slice(0,N)+_,k=!0}}let yt=oe.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(yt&&yt.index!==void 0){var P=yt[0].length-yt[2].length,C=P>=2&&yt[0].charCodeAt(P-2)===Ze;if(!C){for(var S=!1,j=0,R=0;R<yt.index;R++)oe.charCodeAt(R)===Me&&j++;if(S=j%2===1,!S){let Ge=yt[1];kr(oe,`</${Ge}`,0)===-1&&(oe=oe.slice(0,yt.index)+yt[2])}}}oe!==Ne&&(e=e.slice(0,t)+oe,r=t+oe.length)}let D=[];var H=[];let T=t;var W="",F=i.disableAutoLink||i.disableBareUrls||a.inAnchor?-1:e.indexOf("@",t);for(F>=r&&(F=-1);t<r;){let Se=e.charCodeAt(t),oe=null;if(Se===Me){if(oe=Yg(e,t,r),!oe){var V=Lr(e,t,r,Me);t+=V-1}}else if(Se===Xe||Se===Je){var z=t0(e,t,r);if(z){if(z.canOpen||z.canClose){(W||t>T)&&(D.push(Zr(W+e.slice(T,t))),W="");var J=e.slice(t,t+z.len),Y=Zr(J);H.push({idx:D.length,ch:Se,len:z.len,canOpen:z.canOpen,canClose:z.canClose,active:!0}),D.push(Y),t+=z.len,T=t;continue}t+=z.len-1}}else if(Se===ot)oe=Xg(e,t,r,a,i);else if(Se===Vt)oe=e0(e,t,r,a,i);else if(Se===Be)t+1<r&&e.charCodeAt(t+1)===br&&(oe=i0(e,t,r)),oe||(oe=Oc(e,t,r,a,i));else if(Se===xt&&t+1<r&&e.charCodeAt(t+1)===Be)oe=Oc(e,t,r,a,i);else if(Se===Ve)oe=lf(e,t,r),!(oe||i.disableParsingRawHTML||i.ignoreHTMLBlocks)&&(oe=l0(e,t,r,a,i));else if(Se===Hs){var Z=o0(e,t,r);if(Z!==-1){var te=e.slice(t,Z),ie=Rr(te);if(ie!==te){W=W+e.slice(T,t)+ie,t=Z,T=Z;continue}}}else if((Se===Ps||Se===ln||Se===dn)&&!a.inAnchor&&!i.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==Ve)){var ae=t+1<r?e.charCodeAt(t+1):0;(Se===Ps&&ae===Rn||Se===dn&&ae===Rn||Se===ln&&ae===ln)&&(oe=s0(e,t,r,i))}if(!oe&&F>=0&&F-t<=64&&!a.inAnchor&&!i.disableAutoLink&&!i.disableBareUrls&&(Se>=pe&&Se<=ye||Se>=qe&&Se<=He||Se>=$e&&Se<=_e)&&(oe=a0(e,t,r,i),!oe&&t>=F&&(F=e.indexOf("@",t+1),F>=r&&(F=-1))),Se===ce&&a.k){var de=!1,ge=0;if(t>T&&e.charCodeAt(t-1)===st)de=!0,ge=1;else{for(var ue=0,Ce=t-1;Ce>=T&&e.charCodeAt(Ce)===ne;)ue++,Ce--;ue>=2&&(de=!0,ge=ue)}if(de){for((W||t-ge>T)&&(D.push(Zr(W+e.slice(T,t-ge))),W=""),D.push({type:ee.breakLine}),t++;t<r&&e.charCodeAt(t)===ne;)t++;T=t;continue}var Pe=t>T&&e.charCodeAt(t-1)===ne,fe=t+1<r&&e.charCodeAt(t+1)===ne;if(Pe||fe){for(var Ye=t;Ye>T&&e.charCodeAt(Ye-1)===ne;)Ye--;for(W+=`${e.slice(T,Ye)}
|
||
`,t++;t<r&&e.charCodeAt(t)===ne;)t++;T=t;continue}}if(oe)(W||t>T)&&(D.push(Zr(W+e.slice(T,t))),W=""),D.push(oe.node),t=oe.end,T=t;else{if(Se===st&&t+1<r){let Ne=e.charCodeAt(t+1);if(Lo(Ne)&Nn){(W||t>T)&&(D.push(Zr(W+e.slice(T,t))),W=""),D.push(Zr(e[t+1])),t+=2,T=t;continue}}if(t++,F<0||F-t>64)for(;t<r&&!(F>=0&&F-t<=64);){var it=e.charCodeAt(t);if(it<Ws&&!rf[it])t++;else break}}}return(W||r>T)&&(D.push(Zr(W+e.slice(T,r))),W=""),H.length>0&&r0(D,H),Ut=s,oi--,D}var u0=500;function Tr(e,t,r){var n=t.o||0;if(n>u0)return[{type:ee.text,text:e}];if(t.o=n+1,r.optimizeForStreaming&&!(t.i||t.w)){for(var i=e.length;i>0&&e.charCodeAt(i-1)===ce;)i--;for(var s=i;s>0&&e.charCodeAt(s-1)!==ce;)s--;if(i>s&&e.charCodeAt(s)===ct){for(var a=!1,o=s+1;o<i;o++){var l=e.charCodeAt(o);if(l!==ne&&l!==se&&l!==ct&&l!==St&&l!==xe){a=!0;break}}for(var c=!1,u=!1,d=0,h=s,m=s-1;m>0;){for(var g=m;g>0&&e.charCodeAt(g-1)!==ce;)g--;if(e.charCodeAt(g)!==ct)break;h=g;for(var b=!0,v=!1,y=g;y<m;y++){var f=e.charCodeAt(y);if(f===xe)v=!0;else if(f!==ne&&f!==se&&f!==St&&f!==ct){b=!1;break}}b&&v?(c=!0,u=!0):u||d++,m=g-1}a?c||(e=e.slice(0,s).trimEnd()):e=c&&d>0?e.slice(0,s).trimEnd():e.slice(0,h).trimEnd()}for(var A=-1,O=-1,p=-1,x=!1,$=e.length-1;$>=0;$--)if(e.charCodeAt($)===Ve){for(var k=$+1<e.length?e.charCodeAt($+1):0,N=k>=pe&&k<=ye||k>=qe&&k<=He,I=k===Ze&&$+2<e.length&&(e.charCodeAt($+2)>=pe&&e.charCodeAt($+2)<=ye||e.charCodeAt($+2)>=qe&&e.charCodeAt($+2)<=He),U=k===xt||k===Kn,q=e.length;q>$+1&&e.charCodeAt(q-1)===ce;)q--;var M=$+1>=q;if(N||I||U||M){var L=$+1;if((I||N)&&(L=$+2),N||I)for(;L<e.length;){var K=e.charCodeAt(L);if(K>=pe&&K<=ye||K>=qe&&K<=He||K>=$e&&K<=_e)L++;else break}for(var B=N||I?L:$+2;B<e.length&&e.charCodeAt(B)!==Ee;)B++;if(B>=e.length)A=$,x=!0;else if((N||I)&&e.charCodeAt(B-1)!==Ze){for(var Q=!1,X=B+1;X<e.length;X++)if(e.charCodeAt(X)===Ve){Q=!0;break}Q||(A=$,O=L,p=B+1)}}break}if(A>=0){for(var re=0,E=0;E<A;E++)e.charCodeAt(E)===Me&&re++;if(re%2===0)if(x)e=e.slice(0,A);else{var _=e.slice(A+1,O);kr(e,`</${_}`,0)===-1&&(e=e.slice(0,A)+e.slice(p))}}for(var P=e.length;P>0&&e.charCodeAt(P-1)===ce;)P--;if(P>0){for(var C=P;C>0&&e.charCodeAt(C-1)!==ce;)C--;for(var S=C,j=0;S<P&&e.charCodeAt(S)===ne&&j<3;)S++,j++;if(C>0&&S<P&&Lg(e,S,P)){for(var R=C-1,D=R;D>0&&e.charCodeAt(D-1)!==ce;)D--;_t(e,D,R)||(e=e.slice(0,C).trimEnd())}}var H=e.length;if(H>0){for(var T=e.lastIndexOf(`
|
||
`),W=T===-1?0:T+1,F=H,V=W,z=0;V<F&&e.charCodeAt(V)===ne&&z<3;)V++,z++;if(V<F){var J=e.charCodeAt(V),Y=!1;if(J===Xe||J===xe||J===qr){var Z=V+1;if(Z>=F||e.charCodeAt(Z)===ne||e.charCodeAt(Z)===se){for(var te=Z;te<F&&(e.charCodeAt(te)===ne||e.charCodeAt(te)===se);)te++;te>=F&&(Y=!0)}}else if(J>=$e&&J<=_e){for(var ie=V;ie<F&&e.charCodeAt(ie)>=$e&&e.charCodeAt(ie)<=_e;)ie++;if(ie<F&&(e.charCodeAt(ie)===zt||e.charCodeAt(ie)===Bt)){var ae=ie+1;if(ae>=F||e.charCodeAt(ae)===ne||e.charCodeAt(ae)===se){for(var de=ae;de<F&&(e.charCodeAt(de)===ne||e.charCodeAt(de)===se);)de++;de>=F&&(Y=!0)}}}Y&&(e=e.slice(0,W).trimEnd())}}}if(t.inline)return ar(e,0,e.length,t,r);let ge=[],ue=0,Ce=e.length;if(ue===0&&!r.disableFrontmatter&&e.startsWith("---")){let Ne=ig(e);if(Ne?.hasValidYaml){if(r.preserveFrontmatter!==!1){let Ct=e.slice(0,Ne.endPos).trimEnd();ge.push({type:ee.frontmatter,text:Ct})}ue=Ne.endPos}}for(;ue<Ce;){for(var Pe=e.indexOf(`
|
||
`,ue),fe=Pe<0?Ce:Pe;ue<Ce&&_t(e,ue,fe);)ue=fe<Ce?fe+1:fe,ue<Ce&&(Pe=e.indexOf(`
|
||
`,ue),fe=Pe<0?Ce:Pe);if(ue>=Ce)break;var Ye=e.charCodeAt(ue)===io;nt(e,ue,fe);let Ne=null;if(lo=e,co=ue,Cs=fe,!Ye&&De>=4&&!t.inHTML)Ne=zg(e,ue);else if(!Ye){let Ct=ue+Ie,et=e.charCodeAt(Ct);et===Ht?Ne=qg(e,ue,t,r):et===Ee?Ne=Bg(e,ue,t,r):et===Me||et===ot?Ne=Vg(e,ue):et===xe||et===Xe||et===Je?(Ne=Dr(e,ue),!Ne&&(Ne=xc(e,ue,t,r))):et===qr||et>=$e&&et<=_e?Ne=xc(e,ue,t,r):et===Ve?Ne=of(e,ue,t,r):et===ct?Ne=Ac(e,ue,t,r):et===Be&&(Ne=Wg(e,ue,t))}if(!Ne){for(var it=!1,Se=ue;Se<fe;Se++)if(e.charCodeAt(Se)===ct){it=!0;break}it&&(Ne=Ac(e,ue,t,r))}if(Ne||(Ne=Jg(e,ue,t,r)),Ne)Ne.node.type!==ee.refCollection&&ge.push(Ne.node),ue=Ne.end;else{var oe=e.indexOf(`
|
||
`,ue);ue=oe<0?Ce:oe+1}}return t.o=n,ge}function d0(e,t,r,n){var i=ir(e,t);return i?{tagName:i.tag,tagLower:i.tag.toLowerCase(),attrs:i.b,whitespaceBeforeAttrs:i.g,isSelfClosing:i.n,hasSpaceBeforeSlash:i.r,isClosing:i.f,hasNewline:i.g.includes(`
|
||
`)||i.b.includes(`
|
||
`),endPos:i.end}:null}function zo(e,t,r){oi=0,e=hg(e),!t.refs&&(t.refs=Object.create(null)),(r.optimizeForStreaming||t.inline)&&(t.w=Mg(e,t.refs,r));var n,i;t.t||(t.t=n=[],t.p=i=[]);let s=Tr(e,t,r);if(n&&i){for(var a=n,o={inline:t.inline,inAnchor:t.inAnchor,inHTML:t.inHTML,htmlDepth:t.d,inList:t.inList,inBlockQuote:t.inBlockQuote,noSetext:t.l,depth:t.o},l=0;l<a.length;l++){var c=a[l];t.inline=c.inline,t.inAnchor=c.inAnchor,t.inHTML=c.inHTML,t.d=c.htmlDepth,t.inList=c.inList,t.inBlockQuote=c.inBlockQuote,t.l=c.noSetext,t.o=c.depth,t.k=c.breaks;var u=ar(c.text,0,c.text.length,t,r);t.k=!1;for(var d=0;d<u.length;d++)c.dest.push(u[d])}t.inline=o.inline,t.inAnchor=o.inAnchor,t.inHTML=o.inHTML,t.d=o.htmlDepth,t.inList=o.inList,t.inBlockQuote=o.inBlockQuote,t.l=o.noSetext,t.o=o.depth;for(var h=i,m=0;m<h.length;m++)for(var g=h[m],b=0;b<g.src.length;b++){var v=g.src[b];if(g.unwrap&&v.type===ee.paragraph)for(var y=v.children,f=0;f<y.length;f++)g.dest.push(y[f]);else g.dest.push(v)}t.t=void 0,t.p=void 0,yo(s,t,r.slugify)}return ef(t.refs)?[{type:ee.refCollection,refs:t.refs},...s]:s}var go;try{wn=G.createElement("div"),go=wn!=null&&typeof wn=="object"&&"$$typeof"in wn&&typeof wn.$$typeof=="symbol"?wn.$$typeof:Symbol.for("react.transitional.element")}catch{go=Symbol.for("react.transitional.element")}var wn;function vo(e,t,r){return{$$typeof:go,type:e,key:r==null?null:String(r),ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}function Dt(e,t){var r={key:e};if(t){var n=Xd(t);for(var i in n)r[i]=n[i]}return r}var kc=typeof G.createContext>"u"?void 0:G.createContext(void 0);function Pc(e,t,r,n,i,s,a,o,l){switch(e.type){case ee.blockQuote:{let y={key:r.key};return e.alert&&(y.className=`markdown-alert-${s(e.alert.toLowerCase(),pn)}`,e.children.unshift(yg(e.alert))),n("blockquote",y,t(e.children,r))}case ee.breakLine:return n("br",{key:r.key});case ee.breakThematic:return n("hr",{key:r.key});case ee.frontmatter:return o.preserveFrontmatter?n("pre",{key:r.key},e.text):null;case ee.codeBlock:{let y=e.lang?Rr(e.lang):"";var c=e.attrs?Xd(e.attrs):{};return c.className=y?`language-${y} lang-${y}`:"",n("pre",{key:r.key},n("code",c,e.text))}case ee.codeInline:return n("code",{key:r.key},e.text);case ee.footnoteReference:return n("a",{key:r.key,href:i(e.target,"a","href")||void 0},n("sup",null,e.text));case ee.gfmTask:return n("input",{checked:e.completed,key:r.key,readOnly:!0,type:"checkbox"});case ee.heading:return n(`h${e.level}`,{id:e.id,key:r.key},t(e.children,r));case ee.htmlBlock:{let y=e;if(kn(o)&&lc(y.tag)){var u=ac(y);return u.kind==="literal"?n("span",{key:r.key},u.literal):n("span",{key:r.key},...xg(u.open,y.children?t(y.children,r):null,u.close))}let f=y.j,A=f!==void 0,O=A?f:y.a?y.e||"":(y.e||"")+(y.h||"");if(O&&y.c){let p=y.tag.toLowerCase(),x=Pg(p),$=y.children,k=$!=null&&$.length>0;if(x){let K=A?f:y.e||"",B=kn(o)?cc(K):K;if(/<[a-z][^>]{0,100}>/i.test(O)){var d=Dt(r.key,e.attrs);return d.dangerouslySetInnerHTML={__html:B},l(e.tag,d)}return l(e.tag,Dt(r.key,e.attrs),B)}let N=new RegExp(`^<${y.tag}(\\s|>)`,"i");if(k&&!N.test(O)&&kn(o)&&Eg(O))return l(e.tag,Dt(r.key,e.attrs),t($,r));if(Ng(O)){let K=kn(o)?cc(O):O;var h=Dt(r.key,e.attrs);return h.dangerouslySetInnerHTML={__html:K},l(e.tag,h)}let I=qo({slugify:o.slugify,sanitizer:i,tagfilter:!0}),U=mg(O);if(new RegExp(`^<${y.tag}(\\s[^>]*)?>(\\s*</${y.tag}>)?$`,"i").test(U))return y.children&&y.children.length>0?l(e.tag,Dt(r.key,e.attrs),t(y.children,r)):l(e.tag,Dt(r.key,e.attrs));let q=zo(U,{inline:!1,refs:a,inHTML:!1},I);tf(q);let M=y.tag.toLowerCase(),L=A;if(L&&k)return l(e.tag,Dt(r.key,e.attrs),t($,r));if(L)return t(q.flatMap(Fn),r);var m=bg(q,M);if(m.found&&m.afterClose.length>0){var g=m.beforeClose.flatMap(Fn),b=m.afterClose.flatMap(Fn);return vo(G.Fragment,{children:[l(e.tag,Dt(r.key,e.attrs),t(g,r)),t(b,r)]},r.key)}return l(e.tag,Dt(r.key,e.attrs),t(q.flatMap(Fn),r))}return yi(e.tag)?l(e.tag,Dt(r.key,e.attrs)):l(e.tag,Dt(r.key,e.attrs),e.children?t(e.children,r):"")}case ee.htmlSelfClosing:{let y=e;if(kn(o)&&lc(y.tag)){var v=ac(y);return n("span",{key:r.key},v.kind==="literal"?v.literal:v.open+(v.close||""))}return l(e.tag,Dt(r.key,e.attrs))}case ee.image:{let y=e.target===null?null:i(e.target,"img","src");return n("img",{key:r.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:y||void 0})}case ee.link:{let y={key:r.key};if(e.target!=null){let f=Cg(e.target,i,"a","href");f!=null&&(y.href=f)}return e.title&&(y.title=e.title),n("a",y,t(e.children,r))}case ee.table:{let y=e;return n("table",{key:r.key},n("thead",{key:"thead"},n("tr",null,y.header.map(function(f,A){return n("th",{key:A,style:y.align[A]===null?{}:{textAlign:y.align[A]}},t(f,r))}))),y.cells.length>0&&n("tbody",{key:"tbody"},y.cells.map(function(f,A){return n("tr",{key:A},f.map(function(O,p){return n("td",{key:p,style:y.align[p]===null?{}:{textAlign:y.align[p]}},t(O,r))}))})))}case ee.text:return e.text;case ee.textFormatted:return n(e.tag,{key:r.key},t(e.children,r));case ee.orderedList:case ee.unorderedList:{let y=e.type===ee.orderedList?"ol":"ul";return n(y,{key:r.key,start:e.type===ee.orderedList?e.start:void 0},e.items.map(function(f,A){return n("li",{key:A},t(f,r))}))}case ee.paragraph:return n("p",{key:r.key},t(e.children,r));case ee.ref:return null;default:return null}}var f0=(e,t,r,n,i,s,a)=>{var o=c=>c.map(u=>"text"in u?u.text:""),l=(c,u={})=>{var d=Array.isArray(c)?c:[c],h=(u.renderDepth||0)+1;if(h>2500)return o(d);u.renderDepth=h;for(var m=u.key,g=[],b=!1,v=0;v<d.length;v++){u.key=v;var y;if(e){var f=Pc.bind(null,d[v],l,u,t,r,n,i,s,a);y=e(f,d[v],l,u)}else y=Pc(d[v],l,u,t,r,n,i,s,a);var A=typeof y=="string";if(b&&typeof y=="string"){var O=g.at(-1);g[g.length-1]=(typeof O=="string"?O:"")+y}else if(y!=null)if(Array.isArray(y))for(var p=0;p<y.length;p++)g.push(y[p]);else g.push(y);b=A}return u.key=m,u.renderDepth=h-1,g};return l},h0=(e,t)=>{let r=so(t,e,void 0);return r?typeof r=="function"||typeof r=="object"&&"render"in r?r:so(t,`${e}.component`,e):e};function m0(e,t){let r={...t||{}};r.overrides=r.overrides||{};let n=r.slugify||pn,i=r.sanitizer||pr,s=r.createElement,a=ef(r.overrides),o=A=>bo(A,{...r,wrapper:null});function l(A){for(var O in A){var p=A[O];if(typeof p=="string"&&p.length>0&&p.charCodeAt(0)===Ve&&(jg.test(p)||Og.test(p)||d0(p,0))){var x=o(p.trim());A[O]=O==="innerHTML"&&Array.isArray(x)?x[0]:x}}}function c(A,O,...p){var x=O||{},$=A;if(a){var k=so(r.overrides,`${A}.props`,{});$=h0(A,r.overrides),x={...x,...k,className:$g(x.className,k.className)||void 0}}if(!s){var N=x.key;return N!=null&&delete x.key,p.length===1?x.children=p[0]:p.length>1&&(x.children=p),vo($,x,N)}return s($,x,...p)}function u(A,O,...p){return O&&l(O),c(A,O,...p)}let d=qo(r,r.forceInline),h=e[0]&&e[0].type===ee.refCollection?e[0].refs:Object.create(null),m=f0(r.renderRule,c,i,n,h,r,u),g=m(e,{inline:r.forceInline,refs:h}),b=Ag(h);if(b.length>0&&g.push(c("footer",{key:"footer"},b.map(function(A){let O=A.identifier.charCodeAt(0)===br?A.identifier.slice(1):A.identifier,p=zo(A.footnote,{inline:!0,refs:h},d);return c("div",{id:n(O,pn),key:A.identifier},`${O}: `,m(p,{inline:!0,refs:h}))}))),r.wrapper===null)return g;let v=r.wrapper||(r.forceInline?"span":"div"),y;if(g.length>1||r.forceWrapper)y=g;else return g.length===1?g[0]:null;var f=r.wrapperProps?{...r.wrapperProps}:{};return f.children=y,vo(v,f,"outer")}function bo(e="",t={}){let r={...t||{}};r.overrides=r.overrides||{},r.slugify,r.sanitizer;function n(s){let a=r.forceInline||!(r.forceBlock||lg.test(s)),o=qo(r,a),l=a?s:vg(s),c=zo(l,{inline:a,refs:i},o);return m0(c,{...r,forceInline:a})}let i=Object.create(null);return n(e)}function p0(e){let t=G.useRef(e),r=t.current;if(r!==e){var n=!0,i=0;for(var s in e)if(i++,!Object.is(r[s],e[s])){n=!1;break}if(n){var a=0;for(var o in r)a++;n=a===i}n||(t.current=e)}return t.current}var vi=({children:e,options:t,...r})=>{if(!(typeof G.useContext<"u")){let o={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...r}};return bo(e??"",o)}let n=kc?G.useContext(kc):void 0,i=p0(r),s=G.useMemo(()=>({...n,...t,overrides:{...n?.overrides,...t?.overrides},wrapperProps:{...n?.wrapperProps,...t?.wrapperProps,...i}}),[n,t,i]),a=e??"";return G.useMemo(()=>bo(a,s),[a,s])};const cf=Symbol("remove-this-key"),Nc=Symbol("reset");function y0(e,t){return Array.isArray(e.required)&&e.required.includes(t)}function g0(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return e(Fe.NewStringDefault)}}function uf(e){return!!e?.[sn]}function Fc(e){return Object.keys(e).filter(t=>uf(e[t]))}function v0(e){const{fieldPathId:t,schema:r,registry:n,uiSchema:i,errorSchema:s,formData:a,onChange:o,onBlur:l,onFocus:c,disabled:u,readonly:d,required:h,hideError:m,propertyName:g,handleKeyRename:b,handleRemoveProperty:v,addedByAdditionalProperties:y}=e,[f,A]=G.useState(!1),{globalFormOptions:O,fields:p}=n,{SchemaField:x}=p,$=Bn(Qt(g,O,t.path)),k=G.useCallback((q,M,L,K)=>{let B=q;q===void 0&&y&&Ae(M,$.path)&&(B=""),o(B,M,L,K)},[o,y,$]),N=G.useCallback(q=>{g!==q&&A(!0),b(g,q)},[g,b]),I=G.useCallback(q=>{const{target:{value:M}}=q;N(M)},[N]),U=G.useCallback(()=>{v(g)},[g,v]);return w.jsx(x,{name:g,required:h,schema:r,uiSchema:i,errorSchema:s,fieldPathId:$,formData:a,wasPropertyKeyModified:f,onKeyRename:N,onKeyRenameBlur:I,onRemoveProperty:U,onChange:k,onBlur:l,onFocus:c,registry:n,disabled:u,readonly:d,hideError:m})}const b0=G.memo(v0);function S0(e){const{schema:t,uiSchema:r={},formData:n,errorSchema:i,fieldPathId:s,name:a,required:o=!1,disabled:l,readonly:c,hideError:u,onBlur:d,onFocus:h,onChange:m,registry:g,title:b}=e,{fields:v,schemaUtils:y,translateString:f,globalUiOptions:A}=g,{OptionalDataControlsField:O}=v,p=G.useRef(n);p.current=n;const x=G.useMemo(()=>y.retrieveSchema(t,n,!0),[y,t,n]),$=G.useMemo(()=>me(r,A),[r,A]),k=G.useMemo(()=>x.properties??{},[x.properties]),N=e.childFieldPathId??s,I=G.useRef({previousKey:"",currentKey:void 0}),[U,q]=G.useState(()=>Fc(k)),M=G.useMemo(()=>{const D=new Set(Fc(k));return Object.keys(k).filter(H=>!D.has(H))},[k]),L=$.title??x.title??b??a,K=$.description??x.description,B=pi(g,x,o,r),Q=zn(n);let X=[];const re=G.useCallback((D,H)=>{const{duplicateKeySuffixSeparator:T="-"}=me(r,A);let W=0,F=D;for(;bt(H,F);)W+=1,F=`${D}${T}${W}`;return F},[r,A]),E=G.useCallback(()=>{if(!(x.additionalProperties||x.patternProperties))return;const D={...n},H=re("newKey",D);if(x.patternProperties)rt(D,H,null);else{let T,W,F;if(le(x.additionalProperties)){T=x.additionalProperties.type,W=x.additionalProperties.const,F=x.additionalProperties.default;let z=x.additionalProperties;Ke in z&&(z=y.retrieveSchema({[Ke]:z[Ke]},n),T=z.type,W=z.const,F=y.getDefaultFormState(z,F)),!T&&(Oe in z||ve in z)&&(T="object")}const V=W??F??g0(f,T);rt(D,H,V)}I.current.previousKey===H&&(I.current.currentKey=H,I.current.previousKey=re(H,D)),q(T=>[...T,H]),m(D,N.path)},[n,m,f,y,N,re,x]),_=G.useCallback((D,H)=>{if(D!==H){const T=p.current,W=re(H,T),F={...T},V={[D]:W},z=Object.keys(F).map(Y=>({[Object.hasOwn(V,Y)?V[Y]:Y]:F[Y]})),J=Object.assign({},...z);p.current=J,D!==I.current.currentKey&&(I.current.previousKey=D),I.current.currentKey=W,q(Y=>Y.map(Z=>Z===D?W:Z)),m(J,N.path)}},[m,N,re]),P=G.useCallback(D=>{q(H=>H.filter(T=>T!==D)),m(cf,[...N.path,D])},[m,N]),C=G.useCallback(D=>I.current.currentKey===D?I.current.previousKey:D,[]);if(!B||Q)try{const D=new Set(M),H=U.filter(T=>Object.hasOwn(k,T)&&!D.has(T));X=Xp([...M,...H],$.order)}catch(D){return w.jsxs("div",{children:[w.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:w.jsx(vi,{options:{disableParsingRawHTML:!0},children:f(Fe.InvalidObjectField,[a||"root",D.message])})}),w.jsx("pre",{children:JSON.stringify(x)})]})}const S=be("ObjectFieldTemplate",g,$),j=B?w.jsx(O,{...e,fieldPathId:N,schema:x}):void 0,R={title:$.label===!1?"":L,description:$.label===!1?void 0:K,properties:X.map(D=>{const H=uf(x.properties?.[D]),T=H?r.additionalProperties:r[D],W=me(T).widget==="hidden";return{content:w.jsx(b0,{propertyName:D,required:y0(x,D),schema:lr(x,D),uiSchema:T,errorSchema:he(i,D),fieldPathId:N,formData:he(n,D),handleKeyRename:_,handleRemoveProperty:P,addedByAdditionalProperties:H,onChange:m,onBlur:d,onFocus:h,registry:g,disabled:l,readonly:c,hideError:u},C(D)),name:D,readonly:c,disabled:l,required:o,hidden:W}}),readonly:c,disabled:l,required:o,fieldPathId:s,uiSchema:r,errorSchema:i,schema:x,formData:n,registry:g,optionalDataControl:j,className:B?"rjsf-optional-object-field":void 0};return w.jsx(S,{...R,onAddProperty:E})}function x0(e){const{schema:t,uiSchema:r={},formData:n,disabled:i=!1,readonly:s=!1,onChange:a,errorSchema:o,fieldPathId:l,registry:c}=e,{globalUiOptions:u={},schemaUtils:d,translateString:h}=c,m=me(r,u),g=be("OptionalDataControlsTemplate",c,m),b=zn(n);let v,y,f,A;if(i||s)v=Aa(l,"Msg"),y=b?void 0:h(Fe.OptionalObjectEmptyMsg);else{const O=b?Fe.OptionalObjectRemove:Fe.OptionalObjectAdd;y=h(O),b?(v=Aa(l,"Remove"),A=()=>a(void 0,l.path,o)):(v=Aa(l,"Add"),f=()=>{let p=d.getDefaultFormState(t,n,"excludeObjectChildren");p===void 0&&(p=It(t)==="array"?[]:{}),a(p,l.path,o)})}return y&&w.jsx(g,{id:v,registry:c,schema:t,uiSchema:r,label:y,onAddClick:f,onRemoveClick:A})}const C0={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function A0(e,t,r){const{field:n}=t,{fields:i,schemaUtils:s}=r;if(typeof n=="function")return n;if(typeof n=="string"&&n in i)return i[n];const a=It(e),o=Array.isArray(a)?a[0]:a||"",l=e.$id;let c=C0[o];return l&&l in i&&(c=l),(e.anyOf||e.oneOf)&&!s.isSelect(e)&&c!=="ObjectField"?()=>null:c in i?i[c]:i.FallbackField}function w0(e){const{schema:t,fieldPathId:r,uiSchema:n,formData:i,errorSchema:s,name:a,onChange:o,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:d=!1,registry:h,wasPropertyKeyModified:m=!1}=e,{schemaUtils:g,globalFormOptions:b,globalUiOptions:v,fields:y}=h,{AnyOfField:f,OneOfField:A,CyclicSchemaField:O}=y,p=r[Te],x=G.useCallback((Ce,Pe,fe,Ye)=>o(Ce,Pe,fe,Ye||p),[p,o]);if(t[Co])return w.jsx(O,{...e});const $=ey(t,n,h),k=me($,v),N=be("FieldTemplate",h,k),I=be("DescriptionFieldTemplate",h,k),U=be("FieldHelpTemplate",h,k),q=be("FieldErrorTemplate",h,k),M=g.retrieveSchema(t,i),L=A0(M,k,h),B=!!M.deprecated?k.deprecatedHandling??"label":void 0,Q=!!(k.disabled??e.disabled)||B==="disable",X=!!(k.readonly??(e.readonly||e.schema.readOnly||M.readOnly)),re=k.hideError,E=re===void 0?e.hideError:!!re,_=!!(k.autofocus??e.autofocus);if(Object.keys(M).length===0)return null;let P=g.getDisplayLabel(M,$,v);const C=k.field&&k.fieldReplacesAnyOrOneOf===!0;let S,j,R={fieldPathId:r};if((Oe in M||ve in M)&&!C&&!g.isSelect(M)){M[Oe]?(S=f,j=M[Oe].map(fe=>g.retrieveSchema(le(fe)?fe:{},i))):M[ve]&&(S=A,j=M[ve].map(fe=>g.retrieveSchema(le(fe)?fe:{},i)));const Ce=pi(h,M,d,$),Pe=zn(i);P=P&&(!Ce||Pe),R={childFieldPathId:r,fieldPathId:Qt("XxxOf",b,r)}}const{__errors:D,...H}=s||{},{"ui:classNames":T,classNames:W,"ui:style":F,...V}=$;if(Pr in V){const{classNames:Ce,style:Pe,...fe}=V[Pr];V[Pr]=fe}const z=w.jsx(L,{...e,onChange:x,...R,schema:M,uiSchema:V,disabled:Q,readonly:X,hideError:E,autofocus:_,errorSchema:H,rawErrors:D}),J=r[Te];let Y;m?Y=a:Y=sn in M?a:k.title||e.schema.title||M.title||e.title||a,B==="label"&&(Y=h.translateString(Fe.DeprecatedLabel,[Y]));const Z=k.description||e.schema.description||M.description||"",{help:te}=k,ie=k.widget==="hidden"||B==="hide",ae=["rjsf-field",`rjsf-field-${It(M)}`];!E&&D&&D.length>0&&ae.push("rjsf-field-error"),k.classNames&&ae.push(k.classNames);const de=w.jsx(U,{help:te,fieldPathId:r,schema:M,uiSchema:$,hasErrors:!E&&D&&D.length>0,registry:h}),ge=E||S&&!g.isSelect(M)?void 0:w.jsx(q,{errors:D,errorSchema:s,fieldPathId:r,schema:M,uiSchema:$,registry:h}),ue={description:w.jsx(I,{id:Vn(J),description:Z,schema:M,uiSchema:$,registry:h}),rawDescription:Z,help:de,rawHelp:typeof te=="string"?te:void 0,errors:ge,rawErrors:E?void 0:D,fieldPathId:r,id:J,label:Y,hidden:ie,onChange:o,onKeyRename:l,onKeyRenameBlur:c,onRemoveProperty:u,required:d,disabled:Q,readonly:X,hideError:E,displayLabel:P,classNames:ae.join(" ").trim(),style:k.style,formData:i,schema:M,uiSchema:$,registry:h};return w.jsx(N,{...ue,children:w.jsxs(w.Fragment,{children:[z,S&&w.jsx(S,{name:a,disabled:Q,readonly:X,hideError:E,errorSchema:s,formData:i,fieldPathId:r,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:j,registry:h,required:d,schema:M,uiSchema:$})]})})}const $0=G.memo(w0,(e,t)=>{const{experimental_componentUpdateStrategy:r="customDeep"}=t.registry.globalFormOptions;return r==="always"?!1:r==="shallow"?Xa(e,t):Ae(e,t)});function _0(e){const{schema:t,name:r,uiSchema:n,fieldPathId:i,formData:s,required:a,disabled:o=!1,readonly:l=!1,autofocus:c=!1,onChange:u,onBlur:d,onFocus:h,registry:m,rawErrors:g,hideError:b,title:v}=e,{title:y}=t,{widgets:f,schemaUtils:A,globalUiOptions:O}=m,{defaultWidget:p,enumOptions:x}=qd(t,n,A,f),{widget:$=p,placeholder:k="",title:N,...I}=me(n),U=A.getDisplayLabel(t,n,O),q=N??v??y??r,M=cr(t,$,f),L=G.useCallback((K,B,Q)=>u(K,i.path,B,Q),[u,i]);return w.jsx(M,{options:{...I,enumOptions:x},schema:t,uiSchema:n,id:i.$id,name:r,label:q,hideLabel:!U,hideError:b,value:s,onChange:L,onBlur:d,onFocus:h,required:a,disabled:o,readonly:l,autofocus:c,registry:m,placeholder:k,rawErrors:g,htmlName:i.name})}function E0(){return{AnyOfField:Xl,ArrayField:wy,BooleanField:$y,CyclicSchemaField:_y,FallbackField:ky,LayoutGridField:Mo,LayoutHeaderField:zy,LayoutMultiSchemaField:By,NumberField:Gy,ObjectField:S0,OneOfField:Xl,OptionalDataControlsField:x0,SchemaField:$0,StringField:_0,NullField:Ky}}function j0(e){const{fieldPathId:t,description:r,registry:n,schema:i,uiSchema:s}=e,a=me(s,n.globalUiOptions),{label:o=!0}=a;if(!r||!o)return null;const l=be("DescriptionFieldTemplate",n,a);return w.jsx(l,{id:Vn(t),description:r,schema:i,uiSchema:s,registry:n})}function O0(e){const{disabled:t,hasCopy:r,hasMoveDown:n,hasMoveUp:i,hasRemove:s,fieldPathId:a,onCopyItem:o,onRemoveItem:l,onMoveDownItem:c,onMoveUpItem:u,readonly:d,registry:h,uiSchema:m}=e,{CopyButton:g,MoveDownButton:b,MoveUpButton:v,RemoveButton:y}=h.templates.ButtonTemplates;return w.jsxs(w.Fragment,{children:[(i||n)&&w.jsx(v,{id:nn(a,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||d||!i,onClick:u,uiSchema:m,registry:h}),(i||n)&&w.jsx(b,{id:nn(a,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||d||!n,onClick:c,uiSchema:m,registry:h}),r&&w.jsx(g,{id:nn(a,"copy"),className:"rjsf-array-item-copy",disabled:t||d,onClick:o,uiSchema:m,registry:h}),s&&w.jsx(y,{id:nn(a,"remove"),className:"rjsf-array-item-remove",disabled:t||d,onClick:l,uiSchema:m,registry:h})]})}function k0(e){const{children:t,className:r,buttonsProps:n,displayLabel:i,hasDescription:s,hasToolbar:a,registry:o,uiSchema:l}=e,c=me(l),u=be("ArrayFieldItemButtonsTemplate",o,c),d={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},h=s?31:9,m={display:"flex",alignItems:i?"center":"baseline"},g={display:"flex",justifyContent:"flex-end",marginTop:i?`${h}px`:0};return w.jsxs("div",{className:r,style:m,children:[w.jsx("div",{className:a?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),a&&w.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:w.jsx("div",{className:"btn-group",style:g,children:w.jsx(u,{...n,style:d})})})]})}function P0(e){const{canAdd:t,className:r,disabled:n,fieldPathId:i,uiSchema:s,items:a,optionalDataControl:o,onAddClick:l,readonly:c,registry:u,required:d,schema:h,title:m}=e,g=me(s),b=be("ArrayFieldDescriptionTemplate",u,g),v=be("ArrayFieldTitleTemplate",u,g),y=!c&&!n,{ButtonTemplates:{AddButton:f}}=u.templates;return w.jsxs("fieldset",{className:r,id:i.$id,children:[w.jsx(v,{fieldPathId:i,title:g.title||m,required:d,schema:h,uiSchema:s,registry:u,optionalDataControl:y?o:void 0}),w.jsx(b,{fieldPathId:i,description:g.description||h.description,schema:h,uiSchema:s,registry:u}),y?void 0:o,w.jsx("div",{className:"row array-item-list",children:a}),t&&w.jsx(f,{id:nn(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:n||c,uiSchema:s,registry:u})]})}function N0(e){const{fieldPathId:t,title:r,schema:n,uiSchema:i,required:s,registry:a,optionalDataControl:o}=e,l=me(i,a.globalUiOptions),{label:c=!0}=l;if(!r||!c)return null;const u=be("TitleFieldTemplate",a,l);return w.jsx(u,{id:Ro(t),title:r,required:s,schema:n,uiSchema:i,registry:a,optionalDataControl:o})}function F0(e){const{id:t,schema:r}=e,{examples:n,default:i}=r;return Array.isArray(n)?w.jsx("datalist",{id:Io(t),children:n.concat(i!==void 0&&!n.map(String).includes(String(i))?[i]:[]).map(s=>w.jsx("option",{value:s},String(s)))},`datalist_${t}`):null}function I0(e){const{id:t,name:r,htmlName:n,value:i,readonly:s,disabled:a,autofocus:o,onBlur:l,onFocus:c,onChange:u,onChangeOverride:d,options:h,schema:m,uiSchema:g,registry:b,rawErrors:v,type:y,hideLabel:f,hideError:A,...O}=e,{ClearButton:p}=b.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const x={...O,...Lp(m,y,h)};let $;x.type==="number"||x.type==="integer"?$=i||i===0?i:"":$=i??"";const k=G.useCallback(({target:{value:q}})=>u(q===""?h.emptyValue:q),[u,h]),N=G.useCallback(({target:q})=>l(t,q?.value),[l,t]),I=G.useCallback(({target:q})=>c(t,q?.value),[c,t]),U=G.useCallback(q=>{q.preventDefault(),q.stopPropagation(),u(h.emptyValue)},[u,h.emptyValue]);return w.jsxs(w.Fragment,{children:[w.jsx("input",{id:t,name:n||t,className:"form-control",readOnly:s,disabled:a,autoFocus:o,value:$,...x,list:m.examples?Io(t):void 0,onChange:d||k,onBlur:N,onFocus:I,"aria-describedby":vn(t,!!m.examples)}),h.allowClearTextInputs&&!s&&!a&&$&&w.jsx(p,{registry:b,onClick:U}),w.jsx(F0,{id:t,schema:m})]})}function R0(e){const{iconType:t="default",icon:r,className:n,uiSchema:i,registry:s,...a}=e;return w.jsx("button",{type:"button",className:`btn btn-${t} ${n}`,...a,children:w.jsx("i",{className:`glyphicon glyphicon-${r}`})})}const Vr=G.memo(R0);function D0(e){const{registry:{translateString:t}}=e;return w.jsx(Vr,{title:t(Fe.CopyButton),...e,icon:"copy"})}const T0=G.memo(D0);function M0(e){const{registry:{translateString:t}}=e;return w.jsx(Vr,{title:t(Fe.MoveDownButton),...e,icon:"arrow-down"})}const U0=G.memo(M0);function q0(e){const{registry:{translateString:t}}=e;return w.jsx(Vr,{title:t(Fe.MoveUpButton),...e,icon:"arrow-up"})}const L0=G.memo(q0);function V0(e){const{registry:{translateString:t}}=e;return w.jsx(Vr,{title:t(Fe.RemoveButton),...e,iconType:"danger",icon:"remove"})}const z0=G.memo(V0);function B0({id:e,className:t,onClick:r,disabled:n,registry:i,...s}){const{translateString:a}=i;return w.jsx(Vr,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:a(Fe.ClearButton),onClick:r,disabled:n,registry:i,...s})}const K0=G.memo(B0);function H0({id:e,className:t,onClick:r,disabled:n,registry:i}){const{translateString:s}=i;return w.jsx("div",{className:"row",children:w.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:w.jsx(Vr,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(Fe.AddButton),onClick:r,disabled:n,registry:i})})})}function W0({uiSchema:e}){const{submitText:t,norender:r,props:n={}}=Vp(e);return r?null:w.jsx("div",{children:w.jsx("button",{type:"submit",...n,className:`btn btn-info ${n.className||""}`,children:t})})}function G0(){return{SubmitButton:W0,AddButton:H0,CopyButton:T0,MoveDownButton:U0,MoveUpButton:L0,RemoveButton:z0,ClearButton:K0}}function J0(e){const{name:t,fieldPathId:r,registry:n,onExpand:i}=e,{translateString:s}=n,a=`${r[Te]}-button`;return w.jsxs("div",{style:{marginTop:"1rem"},children:[w.jsx("div",{className:"text-danger",children:s(Fe.CycleDetected,[t])}),w.jsxs("div",{children:[w.jsx("button",{id:a,type:"button",className:"btn btn-sm btn-warning",onClick:()=>i(r[Te]),children:s(Fe.ExpandButton)})," "]})]})}const df=Fo();function ff({description:e,registry:t,uiSchema:r={}}){const{globalUiOptions:n}=t;return me(r,n).enableMarkdownInDescription&&typeof e=="string"?w.jsx(vi,{options:{disableParsingRawHTML:!0},"data-testid":df.markdown,children:e}):e}ff.TEST_IDS=df;function Y0(e){const{id:t,description:r,registry:n,uiSchema:i}=e;return r?w.jsx("div",{id:t,className:"field-description",children:w.jsx(ff,{description:r,registry:n,uiSchema:i})}):null}function Z0({errors:e,registry:t}){const{translateString:r}=t;return w.jsxs("div",{className:"panel panel-danger errors",children:[w.jsx("div",{className:"panel-heading",children:w.jsx("h3",{className:"panel-title",children:r(Fe.ErrorsLabel)})}),w.jsx("ul",{className:"list-group",children:e.map((n,i)=>w.jsx("li",{className:"list-group-item text-danger",children:n.stack},i))})]})}function Q0(e){const{schema:t,registry:r,typeSelector:n,schemaField:i}=e,s=be("MultiSchemaFieldTemplate",r);return w.jsx(s,{selector:n,optionSchemaField:i,schema:t,registry:r})}function X0(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const n=Td(r);return w.jsx("div",{children:w.jsx("ul",{id:n,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,s)=>w.jsx("li",{className:"text-danger",children:i},s))})})}const hf=Fo();function mf({help:e,registry:t,uiSchema:r={}}){const{globalUiOptions:n}=t;return me(r,n).enableMarkdownInHelp&&typeof e=="string"?w.jsx(vi,{options:{disableParsingRawHTML:!0},"data-testid":hf.markdown,children:e}):e}mf.TEST_IDS=hf;function ev(e){const{fieldPathId:t,help:r,uiSchema:n,registry:i}=e;return r?w.jsx("div",{id:Md(t),className:"help-block",children:w.jsx(mf,{help:r,registry:i,uiSchema:n})}):null}const tv="*";function pf(e){const{label:t,required:r,id:n}=e;return t?w.jsxs("label",{className:"control-label",htmlFor:n,children:[t,r&&w.jsx("span",{className:"required",children:tv})]}):null}function rv(e){const{id:t,label:r,children:n,errors:i,help:s,description:a,hidden:o,required:l,displayLabel:c,registry:u,uiSchema:d}=e,h=me(d),m=be("WrapIfAdditionalTemplate",u,h);if(o)return w.jsx("div",{className:"hidden",children:n});const g=h.widget==="checkbox";return w.jsxs(m,{...e,children:[c&&!g&&w.jsx(pf,{label:r,required:l,id:t}),c&&a?a:null,n,i,s]})}function nv(e){const{children:t,column:r,className:n,...i}=e;return w.jsx("div",{className:n,...i,children:t})}function iv(e){const{selector:t,optionSchemaField:r}=e;return w.jsxs("div",{className:"panel panel-default panel-body",children:[w.jsx("div",{className:"form-group",children:t}),r]})}function sv(e){const{className:t,description:r,disabled:n,formData:i,fieldPathId:s,onAddProperty:a,optionalDataControl:o,properties:l,readonly:c,registry:u,required:d,schema:h,title:m,uiSchema:g}=e,b=me(g),v=be("TitleFieldTemplate",u,b),y=be("DescriptionFieldTemplate",u,b);if((h.oneOf||h.anyOf)&&!h.properties&&l.length===0)return null;const A=!c&&!n,{ButtonTemplates:{AddButton:O}}=u.templates;return w.jsxs("fieldset",{className:t,id:s.$id,children:[m&&w.jsx(v,{id:Ro(s),title:m,required:d,schema:h,uiSchema:g,registry:u,optionalDataControl:A?o:void 0}),r&&w.jsx(y,{id:Vn(s),description:r,schema:h,uiSchema:g,registry:u}),A?void 0:o,l.map(p=>p.content),rm(h,g,i)&&w.jsx(O,{id:nn(s,"add"),className:"rjsf-object-property-expand",onClick:a,disabled:n||c,uiSchema:g,registry:u})]})}function av(e){const{id:t,registry:r,label:n,onAddClick:i,onRemoveClick:s}=e;return i?w.jsx(Vr,{id:t,registry:r,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:n}):s?w.jsx(Vr,{id:t,registry:r,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:n}):w.jsx("em",{id:t,children:n})}const ov="*";function lv(e){const{id:t,title:r,required:n,optionalDataControl:i}=e;return w.jsxs("legend",{id:t,children:[r,n&&w.jsx("span",{className:"required",children:ov}),i&&w.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function cv(e){const{schema:t,fieldPathId:r,reason:n,registry:i}=e,{translateString:s}=i;let a=Fe.UnsupportedField;const o=[];return r?.$id&&(a=Fe.UnsupportedFieldWithId,o.push(r.$id)),n&&(a=a===Fe.UnsupportedField?Fe.UnsupportedFieldWithReason:Fe.UnsupportedFieldWithIdAndReason,o.push(n)),w.jsxs("div",{className:"unsupported-field",children:[w.jsx("p",{children:w.jsx(vi,{options:{disableParsingRawHTML:!0},children:s(a,o)})}),t&&w.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function uv(e){const{id:t,classNames:r,style:n,disabled:i,displayLabel:s,label:a,onKeyRenameBlur:o,onRemoveProperty:l,rawDescription:c,readonly:u,required:d,schema:h,hideError:m,rawErrors:g,children:b,uiSchema:v,registry:y}=e,{templates:f,translateString:A}=y,{RemoveButton:O}=f.ButtonTemplates,p=A(Fe.KeyLabel,[a]),x=sn in h,$=!!c,k=["form-group",r];!m&&g&&g.length>0&&k.push("has-error has-danger");const N=k.join(" ").trim();if(!x)return w.jsx("div",{className:N,style:n,children:b});const I=$?46:26;return w.jsx("div",{className:N,style:n,children:w.jsxs("div",{className:"row",children:[w.jsx("div",{className:"col-xs-5 form-additional",children:w.jsxs("div",{className:"form-group",children:[s&&w.jsx(pf,{label:p,required:d,id:`${t}-key`}),s&&c&&w.jsx("div",{children:" "}),w.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:o,defaultValue:a},a)]})}),w.jsx("div",{className:"form-additional form-group col-xs-5",children:b}),w.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${I}px`:void 0},children:w.jsx(O,{id:nn(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||u,onClick:l,uiSchema:v,registry:y})})]})})}function dv(){return{ArrayFieldDescriptionTemplate:j0,ArrayFieldItemTemplate:k0,ArrayFieldItemButtonsTemplate:O0,ArrayFieldTemplate:P0,ArrayFieldTitleTemplate:N0,ButtonTemplates:G0(),BaseInputTemplate:I0,CyclicSchemaExpandTemplate:J0,DescriptionFieldTemplate:Y0,ErrorListTemplate:Z0,FallbackFieldTemplate:Q0,FieldTemplate:rv,FieldErrorTemplate:X0,FieldHelpTemplate:ev,GridTemplate:nv,MultiSchemaFieldTemplate:iv,ObjectFieldTemplate:sv,OptionalDataControlsTemplate:av,TitleFieldTemplate:lv,UnsupportedFieldTemplate:cv,WrapIfAdditionalTemplate:uv}}function fv({time:e=!0,...t}){const{AltDateWidget:r}=t.registry.widgets;return w.jsx(r,{time:e,...t})}function hv(e){const{disabled:t=!1,readonly:r=!1,autofocus:n=!1,options:i,id:s,name:a,registry:o,onBlur:l,onFocus:c}=e,{translateString:u}=o,{elements:d,handleChange:h,handleClear:m,handleSetNow:g}=oy(e);return w.jsxs("ul",{className:"list-inline",children:[d.map((b,v)=>w.jsx("li",{className:"list-inline-item",children:w.jsx(ay,{rootId:s,name:a,select:h,...b,disabled:t,readonly:r,registry:o,onBlur:l,onFocus:c,autofocus:n&&v===0})},v)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&w.jsx("li",{className:"list-inline-item",children:w.jsx("button",{type:"button",className:"btn btn-info btn-now",onClick:g,children:u(Fe.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&w.jsx("li",{className:"list-inline-item",children:w.jsx("button",{type:"button",className:"btn btn-warning btn-clear",onClick:m,children:u(Fe.ClearLabel)})})]})}function mv({id:e,disabled:t,options:r,value:n,autofocus:i=!1,readonly:s,onChange:a,onBlur:o,onFocus:l,htmlName:c}){const{inline:u=!1,enumOptions:d,enumDisabled:h,emptyValue:m}=r,g=No(r),b=Array.isArray(n)?n:[n],v=G.useCallback(({target:f})=>o(e,on(f?.value,d,g,m)),[o,e,d,m,g]),y=G.useCallback(({target:f})=>l(e,on(f?.value,d,g,m)),[l,e,d,m,g]);return w.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(d)&&d.map((f,A)=>{const O=zs(f.value,b),p=Array.isArray(h)&&h.includes(f.value),x=t||p||s?"disabled":"",$=N=>{N.target.checked?a(Mp(A,b,d)):a(Dp(A,b,d))},k=w.jsxs("span",{children:[w.jsx("input",{type:"checkbox",id:Ud(e,A),name:c||e,checked:O,value:Po(f.value,A,g),disabled:t||p||s,autoFocus:i&&A===0,onChange:$,onBlur:v,onFocus:y,"aria-describedby":vn(e)}),w.jsx("span",{children:f.label})]});return u?w.jsx("label",{className:`checkbox-inline ${x}`,children:k},String(f.value)):w.jsx("div",{className:`checkbox ${x}`,children:w.jsx("label",{children:k})},String(f.value))})})}function pv({schema:e,uiSchema:t,options:r,id:n,value:i,disabled:s,readonly:a,label:o,hideLabel:l,autofocus:c=!1,onBlur:u,onFocus:d,onChange:h,registry:m,htmlName:g,required:b}){const v=be("DescriptionFieldTemplate",m,r),y=Ss(e)&&b,f=G.useCallback(k=>h(k.target.checked),[h]),A=G.useCallback(k=>u(n,k.target.checked),[u,n]),O=G.useCallback(k=>d(n,k.target.checked),[d,n]),$=me(t).widget==="checkbox"?void 0:r.description??e.description;return w.jsxs("div",{className:`checkbox ${s||a?"disabled":""}`,children:[!l&&$&&w.jsx(v,{id:Vn(n),description:$,schema:e,uiSchema:t,registry:m}),w.jsxs("label",{children:[w.jsx("input",{type:"checkbox",id:n,name:g||n,checked:typeof i>"u"?!1:i,required:b,disabled:s||a,autoFocus:c,onChange:f,onBlur:A,onFocus:O,"aria-describedby":vn(n)}),Yp(w.jsxs("span",{children:[o,y&&w.jsx("span",{className:"required",children:"*"})]}),l)]})]})}function yv(e){const{disabled:t,readonly:r,options:n,registry:i}=e,s=be("BaseInputTemplate",i,n);return w.jsx(s,{type:"color",...e,disabled:t||r})}function gv(e){const{onChange:t,value:r,options:n,registry:i}=e,s=be("BaseInputTemplate",i,n);return w.jsx(s,{type:"datetime-local",...e,value:fy(r),onChange:a=>t(Zp(a))})}function vv(e){const{onChange:t,options:r,registry:n}=e,i=be("BaseInputTemplate",n,r),s=G.useCallback(a=>t(a||void 0),[t]);return w.jsx(i,{type:"date",...e,onChange:s})}function bv(e){const{options:t,registry:r}=e,n=be("BaseInputTemplate",r,t);return w.jsx(n,{type:"email",...e})}function Sv({fileInfo:e,registry:t}){const{translateString:r}=t,{dataURL:n,type:i,name:s}=e;if(!n)return null;const a=r(Fe.PreviewLabel);return["image/jpeg","image/png"].includes(i)?w.jsx("img",{src:n,alt:a,style:{maxWidth:"100%"},className:"file-preview"}):w.jsxs(w.Fragment,{children:[" ",w.jsx("a",{download:`preview-${s}`,href:n,className:"file-download",children:a})]})}function xv({filesInfo:e,registry:t,preview:r,onRemove:n,options:i}){if(e.length===0)return null;const{translateString:s}=t,{RemoveButton:a}=be("ButtonTemplates",t,i);return w.jsx("ul",{className:"file-info",children:e.map((o,l)=>{const{name:c,size:u,type:d}=o,h=()=>n(l);return w.jsxs("li",{children:[w.jsx(vi,{children:s(Fe.FilesInfo,[c,d,String(u)])}),r&&w.jsx(Sv,{fileInfo:o,registry:t}),w.jsx(a,{onClick:h,registry:t})]},l)})})}function Cv(e){const{disabled:t,readonly:r,required:n,multiple:i,onChange:s,value:a,options:o,registry:l}=e,{filesInfo:c,handleChange:u,handleRemove:d}=dy(a,s,i),h=be("BaseInputTemplate",l,o),m=g=>{g.target.files&&u(g.target.files)};return w.jsxs("div",{children:[w.jsx(h,{...e,disabled:t||r,type:"file",required:a?!1:n,onChangeOverride:m,value:"",accept:o.accept?String(o.accept):void 0}),w.jsx(xv,{filesInfo:c,onRemove:d,registry:l,preview:o.filePreview,options:o})]})}function Av({id:e,value:t,htmlName:r}){return w.jsx("input",{type:"hidden",id:e,name:r||e,value:typeof t>"u"?"":t})}function wv(e){const{options:t,registry:r}=e,n=be("BaseInputTemplate",r,t);return w.jsx(n,{type:"password",...e})}function $v({options:e,value:t,required:r,disabled:n,readonly:i,autofocus:s=!1,onBlur:a,onFocus:o,onChange:l,id:c,htmlName:u}){const{enumOptions:d,enumDisabled:h,inline:m,emptyValue:g}=e,b=No(e),v=G.useCallback(({target:f})=>a(c,on(f?.value,d,b,g)),[a,d,g,c,b]),y=G.useCallback(({target:f})=>o(c,on(f?.value,d,b,g)),[o,d,g,c,b]);return w.jsx("div",{className:"field-radio-group",id:c,role:"radiogroup",children:Array.isArray(d)&&d.map((f,A)=>{const O=zs(f.value,t),p=Array.isArray(h)&&h.includes(f.value),x=n||p||i?"disabled":"",$=()=>l(f.value),k=w.jsxs("span",{children:[w.jsx("input",{type:"radio",id:Ud(c,A),checked:O,name:u||c,required:r,value:Po(f.value,A,b),disabled:n||p||i,autoFocus:s&&A===0,onChange:$,onBlur:v,onFocus:y,"aria-describedby":vn(c)}),w.jsx("span",{children:f.label})]});return m?w.jsx("label",{className:`radio-inline ${x}`,children:k},String(f.value)):w.jsx("div",{className:`radio ${x}`,children:w.jsx("label",{children:k})},String(f.value))})})}function _v(e){const{value:t,registry:{templates:{BaseInputTemplate:r}}}=e;return w.jsxs("div",{className:"field-range-wrapper",children:[w.jsx(r,{type:"range",...e}),w.jsx("span",{className:"range-view",children:t})]})}function Ev({id:e,value:t,required:r,disabled:n,readonly:i,onChange:s,onFocus:a,onBlur:o,schema:l,options:c,htmlName:u}){const{stars:d=5,shape:h="star"}=c,m=l.maximum?Math.min(l.maximum,5):Math.min(Math.max(d,1),5),g=l.minimum||0,b=G.useCallback(A=>{!n&&!i&&s(A)},[s,n,i]),v=G.useCallback(A=>{if(a){const O=Number(A.target.dataset.value);a(e,O)}},[a,e]),y=G.useCallback(A=>{if(o){const O=Number(A.target.dataset.value);o(e,O)}},[o,e]),f=A=>h==="heart"?A?"♥":"♡":A?"★":"☆";return w.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:n||i?"default":"pointer"},children:[[...Array(m)].map((A,O)=>{const p=g+O,x=p<=t;return w.jsx("span",{onClick:()=>b(p),onKeyDown:$=>($.key==="Enter"||$.key===" ")&&b(p),onFocus:v,onBlur:y,"data-value":p,tabIndex:n||i?-1:0,role:"radio","aria-checked":p===t,"aria-label":`${p} ${h==="heart"?"heart":"star"}${p===1?"":"s"}`,style:{color:x?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:f(x)},O)}),w.jsx("input",{type:"hidden",id:e,name:u||e,value:t||"",required:r,disabled:n||i,"aria-hidden":"true"})]})}function Na(e,t){return t?Array.from(e.target.options).slice().filter(r=>r.selected).map(r=>r.value):e.target.value}function jv({schema:e,id:t,options:r,value:n,required:i,disabled:s,readonly:a,multiple:o=!1,autofocus:l=!1,onChange:c,onBlur:u,onFocus:d,placeholder:h,htmlName:m,registry:g,uiSchema:b}){const{enumOptions:v,enumDisabled:y,emptyValue:f}=r,A=o?[]:"",O=No(r),p=G.useCallback(I=>{const U=Na(I,o);return d(t,on(U,v,O,f))},[d,t,o,v,f,O]),x=G.useCallback(I=>{const U=Na(I,o);return u(t,on(U,v,O,f))},[u,t,o,v,f,O]),$=G.useCallback(I=>{const U=Na(I,o);return c(on(U,v,O,f))},[c,o,v,f,O]),k=Tp(n,v,o,O,A),N=!o&&e.default===void 0;return Qp(t,e,v,o),w.jsxs(w.Fragment,{children:[w.jsx(ty,{id:t,multiple:o,options:r,registry:g,uiSchema:b,value:n}),w.jsxs("select",{id:t,name:m||t,multiple:o,className:"form-control",value:k,required:i,disabled:s||a,autoFocus:l,onBlur:x,onFocus:p,onChange:$,"aria-describedby":vn(t),children:[N&&w.jsx("option",{value:"",children:h}),Array.isArray(v)&&v.map(({value:I,label:U},q)=>{const M=y&&y.includes(I);return w.jsx("option",{value:Po(I,q,O),disabled:M,children:U},String(I))})]})]})}function Ov({id:e,options:t,placeholder:r,value:n,required:i,disabled:s,readonly:a,autofocus:o=!1,onChange:l,onBlur:c,onFocus:u,htmlName:d}){const h=G.useCallback(({target:{value:b}})=>l(b===""?t.emptyValue:b),[l,t.emptyValue]),m=G.useCallback(({target:b})=>c(e,b?.value),[c,e]),g=G.useCallback(({target:b})=>u(e,b?.value),[e,u]);return w.jsx("textarea",{id:e,name:d||e,className:"form-control",value:n||"",placeholder:r,required:i,disabled:s,readOnly:a,autoFocus:o,rows:t.rows,onBlur:m,onFocus:g,onChange:h,"aria-describedby":vn(e)})}function kv(e){const{options:t,registry:r}=e,n=be("BaseInputTemplate",r,t);return w.jsx(n,{...e})}function Pv(e){const{onChange:t,options:r,registry:n,schema:i,value:s}=e,a=be("BaseInputTemplate",n,r),o=typeof i.multipleOf=="number"&&Number.isFinite(i.multipleOf)&&i.multipleOf<60,l=G.useCallback(u=>{t(u?o?u:`${u}:00`:void 0)},[o,t]),c=typeof s=="string"&&!o&&/^\d{2}:\d{2}:00$/.test(s)?s.slice(0,-3):s;return w.jsx(a,{type:"time",...e,value:c,onChange:l})}function Nv(e){const{options:t,registry:r}=e,n=be("BaseInputTemplate",r,t);return w.jsx(n,{type:"number",...e})}function Fv(e){const{options:t,registry:r}=e,n=be("BaseInputTemplate",r,t);return w.jsx(n,{type:"url",...e})}function Iv(){return{AltDateWidget:hv,AltDateTimeWidget:fv,CheckboxWidget:pv,CheckboxesWidget:mv,ColorWidget:yv,DateWidget:vv,DateTimeWidget:gv,EmailWidget:bv,FileWidget:Cv,HiddenWidget:Av,PasswordWidget:wv,RadioWidget:$v,RangeWidget:_v,RatingWidget:Ev,SelectWidget:jv,TextWidget:kv,TextareaWidget:Ov,TimeWidget:Pv,UpDownWidget:Nv,URLWidget:Fv}}function Rv(){return{fields:E0(),templates:dv(),widgets:Iv(),rootSchema:{},formContext:{},translateString:Rp,globalFormOptions:{idPrefix:nd,idSeparator:id,useFallbackUiForUnsupportedType:!1}}}function $n(e,t){const{schema:r,uiSchema:n,fieldPathId:i,schemaUtils:s,formData:a,edit:o,errors:l,errorSchema:c}=e;return{schema:r,uiSchema:n,fieldPathId:i,schemaUtils:s,formData:a,edit:o,errors:l,errorSchema:c,...t!==void 0&&{status:t}}}class Or extends G.Component{formElement;pendingChanges=[];isProcessingUserChange=!1;static getDerivedStateFromProps(t,r){if(t.extraErrors!==r.prevExtraErrors){const n={errors:r.schemaValidationErrors||[],errorSchema:r.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=n;return t.extraErrors&&({errors:i,errorSchema:s}=ai(n,t.extraErrors)),r.customErrors&&({errors:i,errorSchema:s}=ai({errors:i,errorSchema:s},r.customErrors.ErrorSchema,!0)),{prevExtraErrors:t.extraErrors,errors:i,errorSchema:s}}return null}constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:r,initialFormData:n,onChange:i}=t,s=r??n;this.state={...this.getStateFromProps(t,s,void 0,void 0,void 0,!0),prevExtraErrors:t.extraErrors},i&&!Ae(this.state.formData,s)&&i($n(this.state)),this.formElement=G.createRef()}getSnapshotBeforeUpdate(t,r){if(!Ae(this.props,t)){const n=bs(this.props.formData,t.formData),i=bs(this.props.formData,this.state.formData),s=!Ae(t.schema,this.props.schema),a=n.length>0||!Ae(t.formData,this.props.formData),o=i.length>0||!Ae(this.state.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,s||a?void 0:this.state.retrievedSchema,s,()=>bs(this.props.formData,t.formData,!0),!o),c=!Ae(l,r);return{nextState:l,shouldUpdate:c}}return{shouldUpdate:!1}}componentDidUpdate(t,r,n){if(n.shouldUpdate){const{nextState:i}=n,s=!Ae(i.formData,this.props.formData),a=this.isProcessingUserChange;if(this.isProcessingUserChange=!1,a&&s)return;s&&!Ae(i.formData,r.formData)&&this.props.onChange&&this.props.onChange($n(i)),this.setState(i)}}getStateFromProps(t,r,n,i=!1,s=()=>[],a=!1,o=!1){const l=this.state||{},c="schema"in t?t.schema:this.props.schema,u="validator"in t?t.validator:this.props.validator,d=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},h=t.formData===void 0&&this.props.formData===void 0,m=typeof r<"u",g="liveValidate"in t?t.liveValidate:this.props.liveValidate,b=m&&!t.noValidate&&g,v="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let{schemaUtils:f,hasNestedConditionalSchema:A}=l;(!f||f.doesSchemaUtilsDiffer(u,c,v,y))&&(f=Np(u,c,v,y),A=Ld(f.getRootSchema(),f.getRootSchema()));const O=f.getRootSchema();let p=r;r===Nc?p=void 0:r===void 0&&h&&(p=l.formData);let x,$,k=!1;const N=[];do{x=f.getDefaultFormState(O,p,!1,l.initialDefaultsGenerated);const re=o?Lt({formData:x}):"";if($=this.updateRetrievedSchema(n??f.retrieveSchema(O,x)),o&&!N.includes(re)&&(A||!Ae($,l.retrievedSchema))){const E=f.sanitizeDataForNewSchema($,l.retrievedSchema,x);if(k=!Ae(E,x),k){x=E,p=E;const _=Lt({formData:E});k=!N.includes(_),N.push(_)}N.push(re)}else k=!1}while(k);const I=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:l.errors||[],errorSchema:l.errorSchema||{}}:{errors:l.schemaValidationErrors||[],errorSchema:l.schemaValidationErrorSchema||{}};let U,q,{schemaValidationErrors:M,schemaValidationErrorSchema:L}=l;if(b&&!a){const re=this.liveValidate(O,f,l.errorSchema,x,void 0,l.customErrors,n,n!==void 0);U=re.errors,q=re.errorSchema,M=re.schemaValidationErrors,L=re.schemaValidationErrorSchema}else{const re=I();if(U=re.errors,q=re.errorSchema,!b){const _=s();if(_.length>0){const P=_.reduce((C,S)=>{const j=Zt(S);for(let R=1;R<j.length;R++)rt(C,[...j.slice(0,R),pt],void 0,!0);return rt(C,j,void 0,!0)},{});L=Mr(re.errorSchema,P,"preventDuplicates"),q=L}}const E=Or.mergeErrors({errorSchema:q,errors:U},t.extraErrors,l.customErrors);U=E.errors,q=E.errorSchema}const K=Or.getRegistry(t,O,f),B=Ae(l.registry,K)?l.registry:K,Q=l.fieldPathId&&l.fieldPathId?.[Te]===B.globalFormOptions.idPrefix?l.fieldPathId:Qt("",B.globalFormOptions);return{schemaUtils:f,schema:O,uiSchema:d,fieldPathId:Q,formData:x,edit:m,errors:U,errorSchema:q,schemaValidationErrors:M,schemaValidationErrorSchema:L,retrievedSchema:$,hasNestedConditionalSchema:A,initialDefaultsGenerated:!0,registry:B}}shouldComponentUpdate(t,r){const{experimental_componentUpdateStrategy:n="customDeep"}=this.props;return ry(this,t,r,n)}validate(t,r=this.state.schema,n,i){const s=n||this.state.schemaUtils,{customValidate:a,transformErrors:o,uiSchema:l}=this.props,c=i??r,u=t?JSON.parse(JSON.stringify(t)):void 0;return s.getValidator().validateFormData(u,c,a,o,l)}renderErrors(t){const{errors:r,errorSchema:n,schema:i,uiSchema:s}=this.state,a=me(s),o=be("ErrorListTemplate",t,a);return r?.length?w.jsx(o,{errors:r,errorSchema:n||{},schema:i,uiSchema:s,registry:t}):null}static mergeErrors(t,r,n){let{errorSchema:i,errors:s}=t;if(r){const a=ai(t,r);i=a.errorSchema,s=a.errors}if(n){const a=ai({errors:s,errorSchema:i},n.ErrorSchema,!0);i=a.errorSchema,s=a.errors}return{errors:s,errorSchema:i}}liveValidate(t,r,n,i,s,a,o,l=!1){const c=this.validate(i,t,r,o),{errors:u}=c;let{errorSchema:d}=c;l&&(d=Mr(n,c.errorSchema,"preventDuplicates"));const h=u,m=d;return{...Or.mergeErrors({errorSchema:d,errors:u},s,a),schemaValidationErrors:h,schemaValidationErrorSchema:m}}getUsedFormData=(t,r)=>$p(t,r);getFieldNames=(t,r)=>_p(t,r);omitExtraData=t=>{const{schema:r,schemaUtils:n}=this.state;return n.omitExtraData(r,t)};setFieldValue=(t,r)=>{const{registry:n}=this.state,i=Array.isArray(t)?t:t.split("."),s=Qt("",n.globalFormOptions,i);this.onChange(r,i,void 0,s[Te])};onChange=(t,r,n,i)=>{this.pendingChanges.push({newValue:t,path:r,newErrorSchema:n,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this.isProcessingUserChange=!0;const{newValue:t,path:r,id:n}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:a,liveOmit:o,noValidate:l,liveValidate:c,onChange:u,disabled:d,readonly:h}=this.props,{formData:m,schemaUtils:g,schema:b,fieldPathId:v,schemaValidationErrorSchema:y,errors:f}=this.state;let{customErrors:A,retrievedSchema:O}=this.state,p=y;const x=v.path[0]||"",$=!r||r.length===0||r.length===1&&r[0]===x;let k=$?t:structuredClone(m);const N=le(k)&&Object.keys(k).length>0&&Object.values(k).every(K=>K===void 0),I=m==null,U=N&&I?void 0:k;if(le(k)||Array.isArray(k)){let K=!1;if(t===cf)Fm(k,r);else if(!$){let X=t;if(t===void 0)if(typeof r[r.length-1]=="number")X=null;else{const{field:E}=g.findFieldInSchema(b,r,m),_=E;!(_&&(ve in _||Oe in _))&&_!==void 0&&(K=!0)}K?rt(k,r,void 0):rt(k,r,X)}const B=O&&!$&&!le(t)&&!Array.isArray(t)&&!d&&!h,Q=this.getStateFromProps(this.props,U,void 0,void 0,void 0,!0,B);k=Q.formData,O=Q.retrievedSchema,K&&k&&rt(k,r,void 0)}const q=!l&&(c===!0||c==="onChange");let M={formData:k,retrievedSchema:O},L=k;if(a===!0&&(o===!0||o==="onChange")&&(L=this.omitExtraData(k),M={...M,formData:L}),i){const K=$?y:he(y,r);if(K&&Object.keys(K).length>0)$?p=i:(p=structuredClone(y),rt(p,r,i,!0));else if(A||(A=new Id),$){const B=i[pt];B&&A.setErrors(B)}else rt(A.ErrorSchema,r,i,!0)}else A&&he(A.ErrorSchema,[...r,pt])&&A.clearErrors(r);if(q&&this.pendingChanges.length===1){const K=this.liveValidate(b,g,p,L,s,A,O);M={...M,formData:L,...K,customErrors:A}}else if(!l&&i){const K=Or.mergeErrors({errorSchema:p,errors:f},s,A);M={...M,formData:L,...K,customErrors:A}}this.setState(M,()=>{u&&u($n({...this.state,...M}),n),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return Ae(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:r=Nc,onChange:n}=this.props,a={formData:this.getStateFromProps(this.props,t??r,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(a,()=>n?.($n({...this.state,...a})))};onBlur=(t,r)=>{const{onBlur:n,omitExtraData:i,liveOmit:s,liveValidate:a}=this.props;if(n&&n(t,r),i===!0&&s==="onBlur"||a==="onBlur"){const{onChange:o,extraErrors:l}=this.props,{formData:c}=this.state;let u=c,d={formData:u};if(i===!0&&s==="onBlur"&&(u=this.omitExtraData(c),d={formData:u}),a==="onBlur"){const{schema:m,schemaUtils:g,errorSchema:b,customErrors:v,retrievedSchema:y}=this.state,f=this.liveValidate(m,g,b,u,l,v,y);d={formData:u,...f,customErrors:v}}const h=Object.keys(d).filter(m=>!m.startsWith("schemaValidation")).some(m=>{const g=this.state[m],b=d[m];return!Ae(g,b)});this.setState(d,()=>{o&&h&&o($n({...this.state,...d}),t)})}};onFocus=(t,r)=>{const{onFocus:n}=this.props;n&&n(t,r)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:r,extraErrors:n,noValidate:i,onSubmit:s}=this.props;let{formData:a}=this.state;if(r===!0&&(a=this.omitExtraData(a)),i||this.validateFormWithFormData(a)){const o=n||{},l=n?Vd(n):[];this.setState({formData:a,errors:l,errorSchema:o,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s($n({...this.state,formData:a},"submitted"),t)})}};static getGlobalFormOptions(t){const{uiSchema:r={},experimental_componentUpdateStrategy:n,idSeparator:i=id,idPrefix:s=nd,nameGenerator:a,useFallbackUiForUnsupportedType:o=!1}=t;return{idPrefix:r["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:o,...n!==void 0&&{experimental_componentUpdateStrategy:n},...a!==void 0&&{nameGenerator:a}}}static getRegistry(t,r,n){const{translateString:i,uiSchema:s={}}=t,{fields:a,templates:o,widgets:l,formContext:c,translateString:u}=Rv();return{fields:{...a,...t.fields},templates:{...o,...t.templates,ButtonTemplates:{...o.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...l,...t.widgets},rootSchema:r,formContext:t.formContext||c,schemaUtils:n,translateString:i||u,globalUiOptions:s[Ga],globalFormOptions:Or.getGlobalFormOptions(t),uiSchemaDefinitions:s[em]??{}}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:r="root",idSeparator:n="_"}=this.props,{property:i}=t,s=Zt(i??"");s.unshift(r);const a=s.join(n);let o=this.formElement.current.elements[a];o||(o=this.formElement.current.querySelector(`input[id^="${a}"], button[id^="${a}"]`)),o?.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=t=>{const{extraErrors:r,extraErrorsBlockSubmit:n,focusOnFirstError:i,onError:s}=this.props,{errors:a}=this.state,o=this.validate(t),{errors:l,errorSchema:c}=r?Or.mergeErrors(o,r):o,u=o.errors.length>0||r&&n;return u?(i&&(typeof i=="function"?i(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:c,schemaValidationErrors:o.errors,schemaValidationErrorSchema:o.errorSchema},()=>{s?s(l):console.error("Form validation failed",l)})):l.length>0?this.setState({errors:l,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):a.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!u};validateForm(){const{omitExtraData:t}=this.props;let{formData:r}=this.state;return t===!0&&(r=this.omitExtraData(r)),this.validateFormWithFormData(r)}render(){const{children:t,id:r,className:n="",tagName:i,name:s,method:a,target:o,action:l,autoComplete:c,enctype:u,acceptCharset:d,noHtml5Validate:h=!1,disabled:m,readonly:g,showErrorList:b="top",_internalFormWrapper:v}=this.props,{schema:y,uiSchema:f,formData:A,errorSchema:O,fieldPathId:p,registry:x}=this.state,{SchemaField:$}=x.fields,{SubmitButton:k}=x.templates.ButtonTemplates,N=v?i:void 0,I=v||i||"form";let{[_s]:U={}}=me(f);m&&(U={...U,props:{...U.props,disabled:!0}});const q={[Pr]:{[_s]:U}};return w.jsxs(I,{className:n||"rjsf",id:r,name:s,method:a,target:o,action:l,autoComplete:c,encType:u,acceptCharset:d,noValidate:h,onSubmit:this.onSubmit,as:N,ref:this.formElement,children:[b==="top"&&this.renderErrors(x),w.jsx($,{name:"",schema:y,uiSchema:f,errorSchema:O,fieldPathId:p,formData:A,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:m,readonly:g}),t||w.jsx(k,{uiSchema:q,registry:x}),b==="bottom"&&this.renderErrors(x)]})}}function Dv(e,t="none"){return t==="all"?e:e.reduce((r,n)=>{const{message:i,schemaPath:s}=n,a=t!=="anyOf"?s?.indexOf(`/${Oe}/`):void 0,o=t!=="oneOf"?s?.indexOf(`/${ve}/`):void 0;let l;return a&&a>=0?l=s?.substring(0,a):o&&o>=0&&(l=s?.substring(0,o)),l&&r.find(u=>u.message===i&&u.schemaPath?.startsWith(l))||r.push(n),r},[])}function Tv(e=[],t,r,n){const i=e.map(s=>{const{instancePath:a,keyword:o,params:l,schemaPath:c,parentSchema:u,...d}=s;let{message:h=""}=d,m=a.replace(/\//g,"."),g=`${m} ${h}`.trim(),b="";const v=[...l.deps?.split(", ")||[],l.missingProperty,l.property].filter(y=>y);if(v.length>0)v.forEach(y=>{const f=m?`${m}.${y}`:y;let A=me(he(t,Zt(f))).title;if(A===void 0){const O=c.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([y]);A=me(he(t,O)).title}if(A===void 0){const O=m.replace(/^\./,"").split(".").filter(Boolean);A=he(t,[...O,y,"title"])}if(A)h=h.replace(`'${y}'`,`'${A}'`),b=A;else{const O=he(u,[Qe,y,"title"]);if(O)h=h.replace(`'${y}'`,`'${O}'`),b=O;else if(n){const p=m.replace(/^\./,"").split(".").filter(Boolean),x=[];for(const k of p)x.push(Qe,k);x.push(Qe,y,"title");const $=he(n,x);$&&(h=h.replace(`'${y}'`,`'${$}'`),b=$)}}}),g=h;else{const y=me(he(t,Zt(m))).title;if(y)g=`'${y}' ${h}`.trim(),b=y;else{const f=u?.title;f&&(g=`'${f}' ${h}`.trim(),b=f)}}return"missingProperty"in l&&(m=m?`${m}.${l.missingProperty}`:l.missingProperty),{name:o,property:m,message:h,params:l,stack:g,schemaPath:c,title:b}});return Dv(i,r)}function Mv(e,t,r,n,i,s,a,o){const{validationError:l}=t;let c=Tv(t.errors,a,o,n);l&&(c=[...c,{stack:l.message}]),typeof s=="function"&&(c=s(c,a));let u=ny(c);if(l&&(u={...u,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:c,errorSchema:u};const d=Ed(e,n,r,n,!0),h=i(d,Ja(d),a,u),m=iy(h);return ai({errors:c,errorSchema:u},m)}var Oi={exports:{}},Fa={},fr={},Qr={},Ia={},Ra={},Da={},Ic;function Ts(){return Ic||(Ic=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((A,O)=>`${A}${O}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((A,O)=>(O instanceof r&&(A[O.str]=(A[O.str]||0)+1),A),{})}}e._Code=n,e.nil=new n("");function i(y,...f){const A=[y[0]];let O=0;for(;O<f.length;)o(A,f[O]),A.push(y[++O]);return new n(A)}e._=i;const s=new n("+");function a(y,...f){const A=[m(y[0])];let O=0;for(;O<f.length;)A.push(s),o(A,f[O]),A.push(s,m(y[++O]));return l(A),new n(A)}e.str=a;function o(y,f){f instanceof n?y.push(...f._items):f instanceof r?y.push(f):y.push(d(f))}e.addCodeArg=o;function l(y){let f=1;for(;f<y.length-1;){if(y[f]===s){const A=c(y[f-1],y[f+1]);if(A!==void 0){y.splice(f-1,3,A);continue}y[f++]="+"}f++}}function c(y,f){if(f==='""')return y;if(y==='""')return f;if(typeof y=="string")return f instanceof r||y[y.length-1]!=='"'?void 0:typeof f!="string"?`${y.slice(0,-1)}${f}"`:f[0]==='"'?y.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(y instanceof r))return`"${y}${f.slice(1)}`}function u(y,f){return f.emptyStr()?y:y.emptyStr()?f:a`${y}${f}`}e.strConcat=u;function d(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:m(Array.isArray(y)?y.join(","):y)}function h(y){return new n(m(y))}e.stringify=h;function m(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=m;function g(y){return typeof y=="string"&&e.IDENTIFIER.test(y)?new n(`.${y}`):i`[${y}]`}e.getProperty=g;function b(y){if(typeof y=="string"&&e.IDENTIFIER.test(y))return new n(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}e.getEsmExportName=b;function v(y){return new n(y.toString())}e.regexpCode=v})(Da)),Da}var Ta={},Rc;function Dc(){return Rc||(Rc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Ts();class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var n;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const u=this._names[c]||this._nameGroup(c);return`${c}${u.index++}`}_nameGroup(c){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=i;class s extends t.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:d}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(u)}[${d}]`}}e.ValueScopeName=s;const a=(0,t._)`\n`;class o extends i{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?a:t.nil}}get(){return this._scope}name(c){return new s(c,this._newName(c))}value(c,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(c),{prefix:m}=h,g=(d=u.key)!==null&&d!==void 0?d:u.ref;let b=this._values[m];if(b){const f=b.get(g);if(f)return f}else b=this._values[m]=new Map;b.set(g,h);const v=this._scope[m]||(this._scope[m]=[]),y=v.length;return v[y]=u.ref,h.setValue(u,{property:m,itemIndex:y}),h}getValue(c,u){const d=this._values[c];if(d)return d.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${c}${d.scopePath}`})}scopeCode(c=this._values,u,d){return this._reduceValues(c,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,d)}_reduceValues(c,u,d={},h){let m=t.nil;for(const g in c){const b=c[g];if(!b)continue;const v=d[g]=d[g]||new Map;b.forEach(y=>{if(v.has(y))return;v.set(y,n.Started);let f=u(y);if(f){const A=this.opts.es5?e.varKinds.var:e.varKinds.const;m=(0,t._)`${m}${A} ${y} = ${f};${this.opts._n}`}else if(f=h?.(y))m=(0,t._)`${m}${f}${this.opts._n}`;else throw new r(y);v.set(y,n.Completed)})}return m}}e.ValueScope=o})(Ta)),Ta}var Tc;function je(){return Tc||(Tc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Ts(),r=Dc();var n=Ts();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=Dc();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(S,j){return this}}class a extends s{constructor(S,j,R){super(),this.varKind=S,this.name=j,this.rhs=R}render({es5:S,_n:j}){const R=S?r.varKinds.var:this.varKind,D=this.rhs===void 0?"":` = ${this.rhs}`;return`${R} ${this.name}${D};`+j}optimizeNames(S,j){if(S[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,S,j)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(S,j,R){super(),this.lhs=S,this.rhs=j,this.sideEffects=R}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,j){if(!(this.lhs instanceof t.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=L(this.rhs,S,j),this}get names(){const S=this.lhs instanceof t.Name?{}:{...this.lhs.names};return M(S,this.rhs)}}class l extends o{constructor(S,j,R,D){super(S,R,D),this.op=j}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class c extends s{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class u extends s{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class d extends s{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class h extends s{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,j){return this.code=L(this.code,S,j),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends s{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((j,R)=>j+R.render(S),"")}optimizeNodes(){const{nodes:S}=this;let j=S.length;for(;j--;){const R=S[j].optimizeNodes();Array.isArray(R)?S.splice(j,1,...R):R?S[j]=R:S.splice(j,1)}return S.length>0?this:void 0}optimizeNames(S,j){const{nodes:R}=this;let D=R.length;for(;D--;){const H=R[D];H.optimizeNames(S,j)||(K(S,H.names),R.splice(D,1))}return R.length>0?this:void 0}get names(){return this.nodes.reduce((S,j)=>q(S,j.names),{})}}class g extends m{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class b extends m{}class v extends g{}v.kind="else";class y extends g{constructor(S,j){super(j),this.condition=S}render(S){let j=`if(${this.condition})`+super.render(S);return this.else&&(j+="else "+this.else.render(S)),j}optimizeNodes(){super.optimizeNodes();const S=this.condition;if(S===!0)return this.nodes;let j=this.else;if(j){const R=j.optimizeNodes();j=this.else=Array.isArray(R)?new v(R):R}if(j)return S===!1?j instanceof y?j:j.nodes:this.nodes.length?this:new y(B(S),j instanceof y?[j]:j.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,j){var R;if(this.else=(R=this.else)===null||R===void 0?void 0:R.optimizeNames(S,j),!!(super.optimizeNames(S,j)||this.else))return this.condition=L(this.condition,S,j),this}get names(){const S=super.names;return M(S,this.condition),this.else&&q(S,this.else.names),S}}y.kind="if";class f extends g{}f.kind="for";class A extends f{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,j){if(super.optimizeNames(S,j))return this.iteration=L(this.iteration,S,j),this}get names(){return q(super.names,this.iteration.names)}}class O extends f{constructor(S,j,R,D){super(),this.varKind=S,this.name=j,this.from=R,this.to=D}render(S){const j=S.es5?r.varKinds.var:this.varKind,{name:R,from:D,to:H}=this;return`for(${j} ${R}=${D}; ${R}<${H}; ${R}++)`+super.render(S)}get names(){const S=M(super.names,this.from);return M(S,this.to)}}class p extends f{constructor(S,j,R,D){super(),this.loop=S,this.varKind=j,this.name=R,this.iterable=D}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,j){if(super.optimizeNames(S,j))return this.iterable=L(this.iterable,S,j),this}get names(){return q(super.names,this.iterable.names)}}class x extends g{constructor(S,j,R){super(),this.name=S,this.args=j,this.async=R}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}x.kind="func";class $ extends m{render(S){return"return "+super.render(S)}}$.kind="return";class k extends g{render(S){let j="try"+super.render(S);return this.catch&&(j+=this.catch.render(S)),this.finally&&(j+=this.finally.render(S)),j}optimizeNodes(){var S,j;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(j=this.finally)===null||j===void 0||j.optimizeNodes(),this}optimizeNames(S,j){var R,D;return super.optimizeNames(S,j),(R=this.catch)===null||R===void 0||R.optimizeNames(S,j),(D=this.finally)===null||D===void 0||D.optimizeNames(S,j),this}get names(){const S=super.names;return this.catch&&q(S,this.catch.names),this.finally&&q(S,this.finally.names),S}}class N extends g{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}N.kind="catch";class I extends g{render(S){return"finally"+super.render(S)}}I.kind="finally";class U{constructor(S,j={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...j,_n:j.lines?`
|
||
`:""},this._extScope=S,this._scope=new r.Scope({parent:S}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,j){const R=this._extScope.value(S,j);return(this._values[R.prefix]||(this._values[R.prefix]=new Set)).add(R),R}getScopeValue(S,j){return this._extScope.getValue(S,j)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,j,R,D){const H=this._scope.toName(j);return R!==void 0&&D&&(this._constants[H.str]=R),this._leafNode(new a(S,H,R)),H}const(S,j,R){return this._def(r.varKinds.const,S,j,R)}let(S,j,R){return this._def(r.varKinds.let,S,j,R)}var(S,j,R){return this._def(r.varKinds.var,S,j,R)}assign(S,j,R){return this._leafNode(new o(S,j,R))}add(S,j){return this._leafNode(new l(S,e.operators.ADD,j))}code(S){return typeof S=="function"?S():S!==t.nil&&this._leafNode(new h(S)),this}object(...S){const j=["{"];for(const[R,D]of S)j.length>1&&j.push(","),j.push(R),(R!==D||this.opts.es5)&&(j.push(":"),(0,t.addCodeArg)(j,D));return j.push("}"),new t._Code(j)}if(S,j,R){if(this._blockNode(new y(S)),j&&R)this.code(j).else().code(R).endIf();else if(j)this.code(j).endIf();else if(R)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new y(S))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(S,j){return this._blockNode(S),j&&this.code(j).endFor(),this}for(S,j){return this._for(new A(S),j)}forRange(S,j,R,D,H=this.opts.es5?r.varKinds.var:r.varKinds.let){const T=this._scope.toName(S);return this._for(new O(H,T,j,R),()=>D(T))}forOf(S,j,R,D=r.varKinds.const){const H=this._scope.toName(S);if(this.opts.es5){const T=j instanceof t.Name?j:this.var("_arr",j);return this.forRange("_i",0,(0,t._)`${T}.length`,W=>{this.var(H,(0,t._)`${T}[${W}]`),R(H)})}return this._for(new p("of",D,H,j),()=>R(H))}forIn(S,j,R,D=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,(0,t._)`Object.keys(${j})`,R);const H=this._scope.toName(S);return this._for(new p("in",D,H,j),()=>R(H))}endFor(){return this._endBlockNode(f)}label(S){return this._leafNode(new c(S))}break(S){return this._leafNode(new u(S))}return(S){const j=new $;if(this._blockNode(j),this.code(S),j.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(S,j,R){if(!j&&!R)throw new Error('CodeGen: "try" without "catch" and "finally"');const D=new k;if(this._blockNode(D),this.code(S),j){const H=this.name("e");this._currNode=D.catch=new N(H),j(H)}return R&&(this._currNode=D.finally=new I,this.code(R)),this._endBlockNode(N,I)}throw(S){return this._leafNode(new d(S))}block(S,j){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(j),this}endBlock(S){const j=this._blockStarts.pop();if(j===void 0)throw new Error("CodeGen: not in self-balancing block");const R=this._nodes.length-j;if(R<0||S!==void 0&&R!==S)throw new Error(`CodeGen: wrong number of nodes: ${R} vs ${S} expected`);return this._nodes.length=j,this}func(S,j=t.nil,R,D){return this._blockNode(new x(S,j,R)),D&&this.code(D).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,j){const R=this._currNode;if(R instanceof S||j&&R instanceof j)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${j?`${S.kind}/${j.kind}`:S.kind}"`)}_elseNode(S){const j=this._currNode;if(!(j instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=j.else=S,this}get _root(){return this._nodes[0]}get _currNode(){const S=this._nodes;return S[S.length-1]}set _currNode(S){const j=this._nodes;j[j.length-1]=S}}e.CodeGen=U;function q(C,S){for(const j in S)C[j]=(C[j]||0)+(S[j]||0);return C}function M(C,S){return S instanceof t._CodeOrName?q(C,S.names):C}function L(C,S,j){if(C instanceof t.Name)return R(C);if(!D(C))return C;return new t._Code(C._items.reduce((H,T)=>(T instanceof t.Name&&(T=R(T)),T instanceof t._Code?H.push(...T._items):H.push(T),H),[]));function R(H){const T=j[H.str];return T===void 0||S[H.str]!==1?H:(delete S[H.str],T)}function D(H){return H instanceof t._Code&&H._items.some(T=>T instanceof t.Name&&S[T.str]===1&&j[T.str]!==void 0)}}function K(C,S){for(const j in S)C[j]=(C[j]||0)-(S[j]||0)}function B(C){return typeof C=="boolean"||typeof C=="number"||C===null?!C:(0,t._)`!${P(C)}`}e.not=B;const Q=_(e.operators.AND);function X(...C){return C.reduce(Q)}e.and=X;const re=_(e.operators.OR);function E(...C){return C.reduce(re)}e.or=E;function _(C){return(S,j)=>S===t.nil?j:j===t.nil?S:(0,t._)`${P(S)} ${C} ${P(j)}`}function P(C){return C instanceof t.Name?C:(0,t._)`(${C})`}})(Ra)),Ra}var we={},Mc;function Re(){if(Mc)return we;Mc=1,Object.defineProperty(we,"__esModule",{value:!0}),we.checkStrictMode=we.getErrorPath=we.Type=we.useFunc=we.setEvaluated=we.evaluatedPropsToName=we.mergeEvaluated=we.eachItem=we.unescapeJsonPointer=we.escapeJsonPointer=we.escapeFragment=we.unescapeFragment=we.schemaRefOrVal=we.schemaHasRulesButRef=we.schemaHasRules=we.checkUnknownRules=we.alwaysValidSchema=we.toHash=void 0;const e=je(),t=Ts();function r(p){const x={};for(const $ of p)x[$]=!0;return x}we.toHash=r;function n(p,x){return typeof x=="boolean"?x:Object.keys(x).length===0?!0:(i(p,x),!s(x,p.self.RULES.all))}we.alwaysValidSchema=n;function i(p,x=p.schema){const{opts:$,self:k}=p;if(!$.strictSchema||typeof x=="boolean")return;const N=k.RULES.keywords;for(const I in x)N[I]||O(p,`unknown keyword: "${I}"`)}we.checkUnknownRules=i;function s(p,x){if(typeof p=="boolean")return!p;for(const $ in p)if(x[$])return!0;return!1}we.schemaHasRules=s;function a(p,x){if(typeof p=="boolean")return!p;for(const $ in p)if($!=="$ref"&&x.all[$])return!0;return!1}we.schemaHasRulesButRef=a;function o({topSchemaRef:p,schemaPath:x},$,k,N){if(!N){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return(0,e._)`${$}`}return(0,e._)`${p}${x}${(0,e.getProperty)(k)}`}we.schemaRefOrVal=o;function l(p){return d(decodeURIComponent(p))}we.unescapeFragment=l;function c(p){return encodeURIComponent(u(p))}we.escapeFragment=c;function u(p){return typeof p=="number"?`${p}`:p.replace(/~/g,"~0").replace(/\//g,"~1")}we.escapeJsonPointer=u;function d(p){return p.replace(/~1/g,"/").replace(/~0/g,"~")}we.unescapeJsonPointer=d;function h(p,x){if(Array.isArray(p))for(const $ of p)x($);else x(p)}we.eachItem=h;function m({mergeNames:p,mergeToName:x,mergeValues:$,resultToName:k}){return(N,I,U,q)=>{const M=U===void 0?I:U instanceof e.Name?(I instanceof e.Name?p(N,I,U):x(N,I,U),U):I instanceof e.Name?(x(N,U,I),I):$(I,U);return q===e.Name&&!(M instanceof e.Name)?k(N,M):M}}we.mergeEvaluated={props:m({mergeNames:(p,x,$)=>p.if((0,e._)`${$} !== true && ${x} !== undefined`,()=>{p.if((0,e._)`${x} === true`,()=>p.assign($,!0),()=>p.assign($,(0,e._)`${$} || {}`).code((0,e._)`Object.assign(${$}, ${x})`))}),mergeToName:(p,x,$)=>p.if((0,e._)`${$} !== true`,()=>{x===!0?p.assign($,!0):(p.assign($,(0,e._)`${$} || {}`),b(p,$,x))}),mergeValues:(p,x)=>p===!0?!0:{...p,...x},resultToName:g}),items:m({mergeNames:(p,x,$)=>p.if((0,e._)`${$} !== true && ${x} !== undefined`,()=>p.assign($,(0,e._)`${x} === true ? true : ${$} > ${x} ? ${$} : ${x}`)),mergeToName:(p,x,$)=>p.if((0,e._)`${$} !== true`,()=>p.assign($,x===!0?!0:(0,e._)`${$} > ${x} ? ${$} : ${x}`)),mergeValues:(p,x)=>p===!0?!0:Math.max(p,x),resultToName:(p,x)=>p.var("items",x)})};function g(p,x){if(x===!0)return p.var("props",!0);const $=p.var("props",(0,e._)`{}`);return x!==void 0&&b(p,$,x),$}we.evaluatedPropsToName=g;function b(p,x,$){Object.keys($).forEach(k=>p.assign((0,e._)`${x}${(0,e.getProperty)(k)}`,!0))}we.setEvaluated=b;const v={};function y(p,x){return p.scopeValue("func",{ref:x,code:v[x.code]||(v[x.code]=new t._Code(x.code))})}we.useFunc=y;var f;(function(p){p[p.Num=0]="Num",p[p.Str=1]="Str"})(f||(we.Type=f={}));function A(p,x,$){if(p instanceof e.Name){const k=x===f.Num;return $?k?(0,e._)`"[" + ${p} + "]"`:(0,e._)`"['" + ${p} + "']"`:k?(0,e._)`"/" + ${p}`:(0,e._)`"/" + ${p}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(p).toString():"/"+u(p)}we.getErrorPath=A;function O(p,x,$=p.opts.strictSchema){if($){if(x=`strict mode: ${x}`,$===!0)throw new Error(x);p.self.logger.warn(x)}}return we.checkStrictMode=O,we}var ki={},Uc;function zr(){if(Uc)return ki;Uc=1,Object.defineProperty(ki,"__esModule",{value:!0});const e=je(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return ki.default=t,ki}var qc;function Gs(){return qc||(qc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=je(),r=Re(),n=zr();e.keywordError={message:({keyword:v})=>(0,t.str)`must pass "${v}" keyword validation`},e.keyword$DataError={message:({keyword:v,schemaType:y})=>y?(0,t.str)`"${v}" keyword must be ${y} ($data)`:(0,t.str)`"${v}" keyword is invalid ($data)`};function i(v,y=e.keywordError,f,A){const{it:O}=v,{gen:p,compositeRule:x,allErrors:$}=O,k=d(v,y,f);A??(x||$)?l(p,k):c(O,(0,t._)`[${k}]`)}e.reportError=i;function s(v,y=e.keywordError,f){const{it:A}=v,{gen:O,compositeRule:p,allErrors:x}=A,$=d(v,y,f);l(O,$),p||x||c(A,n.default.vErrors)}e.reportExtraError=s;function a(v,y){v.assign(n.default.errors,y),v.if((0,t._)`${n.default.vErrors} !== null`,()=>v.if(y,()=>v.assign((0,t._)`${n.default.vErrors}.length`,y),()=>v.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function o({gen:v,keyword:y,schemaValue:f,data:A,errsCount:O,it:p}){if(O===void 0)throw new Error("ajv implementation error");const x=v.name("err");v.forRange("i",O,n.default.errors,$=>{v.const(x,(0,t._)`${n.default.vErrors}[${$}]`),v.if((0,t._)`${x}.instancePath === undefined`,()=>v.assign((0,t._)`${x}.instancePath`,(0,t.strConcat)(n.default.instancePath,p.errorPath))),v.assign((0,t._)`${x}.schemaPath`,(0,t.str)`${p.errSchemaPath}/${y}`),p.opts.verbose&&(v.assign((0,t._)`${x}.schema`,f),v.assign((0,t._)`${x}.data`,A))})}e.extendErrors=o;function l(v,y){const f=v.const("err",y);v.if((0,t._)`${n.default.vErrors} === null`,()=>v.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),v.code((0,t._)`${n.default.errors}++`)}function c(v,y){const{gen:f,validateName:A,schemaEnv:O}=v;O.$async?f.throw((0,t._)`new ${v.ValidationError}(${y})`):(f.assign((0,t._)`${A}.errors`,y),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(v,y,f){const{createErrors:A}=v.it;return A===!1?(0,t._)`{}`:h(v,y,f)}function h(v,y,f={}){const{gen:A,it:O}=v,p=[m(O,f),g(v,f)];return b(v,y,p),A.object(...p)}function m({errorPath:v},{instancePath:y}){const f=y?(0,t.str)`${v}${(0,r.getErrorPath)(y,r.Type.Str)}`:v;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function g({keyword:v,it:{errSchemaPath:y}},{schemaPath:f,parentSchema:A}){let O=A?y:(0,t.str)`${y}/${v}`;return f&&(O=(0,t.str)`${O}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,O]}function b(v,{params:y,message:f},A){const{keyword:O,data:p,schemaValue:x,it:$}=v,{opts:k,propertyName:N,topSchemaRef:I,schemaPath:U}=$;A.push([u.keyword,O],[u.params,typeof y=="function"?y(v):y||(0,t._)`{}`]),k.messages&&A.push([u.message,typeof f=="function"?f(v):f]),k.verbose&&A.push([u.schema,x],[u.parentSchema,(0,t._)`${I}${U}`],[n.default.data,p]),N&&A.push([u.propertyName,N])}})(Ia)),Ia}var Lc;function Uv(){if(Lc)return Qr;Lc=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.boolOrEmptySchema=Qr.topBoolOrEmptySchema=void 0;const e=Gs(),t=je(),r=zr(),n={message:"boolean schema is false"};function i(o){const{gen:l,schema:c,validateName:u}=o;c===!1?a(o,!1):typeof c=="object"&&c.$async===!0?l.return(r.default.data):(l.assign((0,t._)`${u}.errors`,null),l.return(!0))}Qr.topBoolOrEmptySchema=i;function s(o,l){const{gen:c,schema:u}=o;u===!1?(c.var(l,!1),a(o)):c.var(l,!0)}Qr.boolOrEmptySchema=s;function a(o,l){const{gen:c,data:u}=o,d={gen:c,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(d,n,void 0,l)}return Qr}var mt={},Xr={},Vc;function yf(){if(Vc)return Xr;Vc=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.getRules=Xr.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}Xr.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return Xr.getRules=n,Xr}var hr={},zc;function gf(){if(zc)return hr;zc=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.shouldUseRule=hr.shouldUseGroup=hr.schemaHasRulesForType=void 0;function e({schema:n,self:i},s){const a=i.RULES.types[s];return a&&a!==!0&&t(n,a)}hr.schemaHasRulesForType=e;function t(n,i){return i.rules.some(s=>r(n,s))}hr.shouldUseGroup=t;function r(n,i){var s;return n[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(a=>n[a]!==void 0))}return hr.shouldUseRule=r,hr}var Bc;function Ms(){if(Bc)return mt;Bc=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.reportTypeError=mt.checkDataTypes=mt.checkDataType=mt.coerceAndCheckDataType=mt.getJSONTypes=mt.getSchemaTypes=mt.DataType=void 0;const e=yf(),t=gf(),r=Gs(),n=je(),i=Re();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(s||(mt.DataType=s={}));function a(f){const A=o(f.type);if(A.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!A.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&A.push("null")}return A}mt.getSchemaTypes=a;function o(f){const A=Array.isArray(f)?f:f?[f]:[];if(A.every(e.isJSONType))return A;throw new Error("type must be JSONType or JSONType[]: "+A.join(","))}mt.getJSONTypes=o;function l(f,A){const{gen:O,data:p,opts:x}=f,$=u(A,x.coerceTypes),k=A.length>0&&!($.length===0&&A.length===1&&(0,t.schemaHasRulesForType)(f,A[0]));if(k){const N=g(A,p,x.strictNumbers,s.Wrong);O.if(N,()=>{$.length?d(f,A,$):v(f)})}return k}mt.coerceAndCheckDataType=l;const c=new Set(["string","number","integer","boolean","null"]);function u(f,A){return A?f.filter(O=>c.has(O)||A==="array"&&O==="array"):[]}function d(f,A,O){const{gen:p,data:x,opts:$}=f,k=p.let("dataType",(0,n._)`typeof ${x}`),N=p.let("coerced",(0,n._)`undefined`);$.coerceTypes==="array"&&p.if((0,n._)`${k} == 'object' && Array.isArray(${x}) && ${x}.length == 1`,()=>p.assign(x,(0,n._)`${x}[0]`).assign(k,(0,n._)`typeof ${x}`).if(g(A,x,$.strictNumbers),()=>p.assign(N,x))),p.if((0,n._)`${N} !== undefined`);for(const U of O)(c.has(U)||U==="array"&&$.coerceTypes==="array")&&I(U);p.else(),v(f),p.endIf(),p.if((0,n._)`${N} !== undefined`,()=>{p.assign(x,N),h(f,N)});function I(U){switch(U){case"string":p.elseIf((0,n._)`${k} == "number" || ${k} == "boolean"`).assign(N,(0,n._)`"" + ${x}`).elseIf((0,n._)`${x} === null`).assign(N,(0,n._)`""`);return;case"number":p.elseIf((0,n._)`${k} == "boolean" || ${x} === null
|
||
|| (${k} == "string" && ${x} && ${x} == +${x})`).assign(N,(0,n._)`+${x}`);return;case"integer":p.elseIf((0,n._)`${k} === "boolean" || ${x} === null
|
||
|| (${k} === "string" && ${x} && ${x} == +${x} && !(${x} % 1))`).assign(N,(0,n._)`+${x}`);return;case"boolean":p.elseIf((0,n._)`${x} === "false" || ${x} === 0 || ${x} === null`).assign(N,!1).elseIf((0,n._)`${x} === "true" || ${x} === 1`).assign(N,!0);return;case"null":p.elseIf((0,n._)`${x} === "" || ${x} === 0 || ${x} === false`),p.assign(N,null);return;case"array":p.elseIf((0,n._)`${k} === "string" || ${k} === "number"
|
||
|| ${k} === "boolean" || ${x} === null`).assign(N,(0,n._)`[${x}]`)}}}function h({gen:f,parentData:A,parentDataProperty:O},p){f.if((0,n._)`${A} !== undefined`,()=>f.assign((0,n._)`${A}[${O}]`,p))}function m(f,A,O,p=s.Correct){const x=p===s.Correct?n.operators.EQ:n.operators.NEQ;let $;switch(f){case"null":return(0,n._)`${A} ${x} null`;case"array":$=(0,n._)`Array.isArray(${A})`;break;case"object":$=(0,n._)`${A} && typeof ${A} == "object" && !Array.isArray(${A})`;break;case"integer":$=k((0,n._)`!(${A} % 1) && !isNaN(${A})`);break;case"number":$=k();break;default:return(0,n._)`typeof ${A} ${x} ${f}`}return p===s.Correct?$:(0,n.not)($);function k(N=n.nil){return(0,n.and)((0,n._)`typeof ${A} == "number"`,N,O?(0,n._)`isFinite(${A})`:n.nil)}}mt.checkDataType=m;function g(f,A,O,p){if(f.length===1)return m(f[0],A,O,p);let x;const $=(0,i.toHash)(f);if($.array&&$.object){const k=(0,n._)`typeof ${A} != "object"`;x=$.null?k:(0,n._)`!${A} || ${k}`,delete $.null,delete $.array,delete $.object}else x=n.nil;$.number&&delete $.integer;for(const k in $)x=(0,n.and)(x,m(k,A,O,p));return x}mt.checkDataTypes=g;const b={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:A})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${A}}`};function v(f){const A=y(f);(0,r.reportError)(A,b)}mt.reportTypeError=v;function y(f){const{gen:A,data:O,schema:p}=f,x=(0,i.schemaRefOrVal)(f,p,"type");return{gen:A,keyword:"type",data:O,schema:p.type,schemaCode:x,schemaValue:x,parentSchema:p,params:{},it:f}}return mt}var ei={},Kc;function qv(){if(Kc)return ei;Kc=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.assignDefaults=void 0;const e=je(),t=Re();function r(i,s){const{properties:a,items:o}=i.schema;if(s==="object"&&a)for(const l in a)n(i,l,a[l].default);else s==="array"&&Array.isArray(o)&&o.forEach((l,c)=>n(i,c,l.default))}ei.assignDefaults=r;function n(i,s,a){const{gen:o,compositeRule:l,data:c,opts:u}=i;if(a===void 0)return;const d=(0,e._)`${c}${(0,e.getProperty)(s)}`;if(l){(0,t.checkStrictMode)(i,`default is ignored for: ${d}`);return}let h=(0,e._)`${d} === undefined`;u.useDefaults==="empty"&&(h=(0,e._)`${h} || ${d} === null || ${d} === ""`),o.if(h,(0,e._)`${d} = ${(0,e.stringify)(a)}`)}return ei}var Jt={},ze={},Hc;function Xt(){if(Hc)return ze;Hc=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.validateUnion=ze.validateArray=ze.usePattern=ze.callValidateCode=ze.schemaProperties=ze.allSchemaProperties=ze.noPropertyInData=ze.propertyInData=ze.isOwnProperty=ze.hasPropFunc=ze.reportMissingProp=ze.checkMissingProp=ze.checkReportMissingProp=void 0;const e=je(),t=Re(),r=zr(),n=Re();function i(f,A){const{gen:O,data:p,it:x}=f;O.if(u(O,p,A,x.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${A}`},!0),f.error()})}ze.checkReportMissingProp=i;function s({gen:f,data:A,it:{opts:O}},p,x){return(0,e.or)(...p.map($=>(0,e.and)(u(f,A,$,O.ownProperties),(0,e._)`${x} = ${$}`)))}ze.checkMissingProp=s;function a(f,A){f.setParams({missingProperty:A},!0),f.error()}ze.reportMissingProp=a;function o(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ze.hasPropFunc=o;function l(f,A,O){return(0,e._)`${o(f)}.call(${A}, ${O})`}ze.isOwnProperty=l;function c(f,A,O,p){const x=(0,e._)`${A}${(0,e.getProperty)(O)} !== undefined`;return p?(0,e._)`${x} && ${l(f,A,O)}`:x}ze.propertyInData=c;function u(f,A,O,p){const x=(0,e._)`${A}${(0,e.getProperty)(O)} === undefined`;return p?(0,e.or)(x,(0,e.not)(l(f,A,O))):x}ze.noPropertyInData=u;function d(f){return f?Object.keys(f).filter(A=>A!=="__proto__"):[]}ze.allSchemaProperties=d;function h(f,A){return d(A).filter(O=>!(0,t.alwaysValidSchema)(f,A[O]))}ze.schemaProperties=h;function m({schemaCode:f,data:A,it:{gen:O,topSchemaRef:p,schemaPath:x,errorPath:$},it:k},N,I,U){const q=U?(0,e._)`${f}, ${A}, ${p}${x}`:A,M=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,$)],[r.default.parentData,k.parentData],[r.default.parentDataProperty,k.parentDataProperty],[r.default.rootData,r.default.rootData]];k.opts.dynamicRef&&M.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const L=(0,e._)`${q}, ${O.object(...M)}`;return I!==e.nil?(0,e._)`${N}.call(${I}, ${L})`:(0,e._)`${N}(${L})`}ze.callValidateCode=m;const g=(0,e._)`new RegExp`;function b({gen:f,it:{opts:A}},O){const p=A.unicodeRegExp?"u":"",{regExp:x}=A.code,$=x(O,p);return f.scopeValue("pattern",{key:$.toString(),ref:$,code:(0,e._)`${x.code==="new RegExp"?g:(0,n.useFunc)(f,x)}(${O}, ${p})`})}ze.usePattern=b;function v(f){const{gen:A,data:O,keyword:p,it:x}=f,$=A.name("valid");if(x.allErrors){const N=A.let("valid",!0);return k(()=>A.assign(N,!1)),N}return A.var($,!0),k(()=>A.break()),$;function k(N){const I=A.const("len",(0,e._)`${O}.length`);A.forRange("i",0,I,U=>{f.subschema({keyword:p,dataProp:U,dataPropType:t.Type.Num},$),A.if((0,e.not)($),N)})}}ze.validateArray=v;function y(f){const{gen:A,schema:O,keyword:p,it:x}=f;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(I=>(0,t.alwaysValidSchema)(x,I))&&!x.opts.unevaluated)return;const k=A.let("valid",!1),N=A.name("_valid");A.block(()=>O.forEach((I,U)=>{const q=f.subschema({keyword:p,schemaProp:U,compositeRule:!0},N);A.assign(k,(0,e._)`${k} || ${N}`),f.mergeValidEvaluated(q,N)||A.if((0,e.not)(k))})),f.result(k,()=>f.reset(),()=>f.error(!0))}return ze.validateUnion=y,ze}var Wc;function Lv(){if(Wc)return Jt;Wc=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.validateKeywordUsage=Jt.validSchemaType=Jt.funcKeywordCode=Jt.macroKeywordCode=void 0;const e=je(),t=zr(),r=Xt(),n=Gs();function i(h,m){const{gen:g,keyword:b,schema:v,parentSchema:y,it:f}=h,A=m.macro.call(f.self,v,y,f),O=c(g,b,A);f.opts.validateSchema!==!1&&f.self.validateSchema(A,!0);const p=g.name("valid");h.subschema({schema:A,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${b}`,topSchemaRef:O,compositeRule:!0},p),h.pass(p,()=>h.error(!0))}Jt.macroKeywordCode=i;function s(h,m){var g;const{gen:b,keyword:v,schema:y,parentSchema:f,$data:A,it:O}=h;l(O,m);const p=!A&&m.compile?m.compile.call(O.self,y,f,O):m.validate,x=c(b,v,p),$=b.let("valid");h.block$data($,k),h.ok((g=m.valid)!==null&&g!==void 0?g:$);function k(){if(m.errors===!1)U(),m.modifying&&a(h),q(()=>h.error());else{const M=m.async?N():I();m.modifying&&a(h),q(()=>o(h,M))}}function N(){const M=b.let("ruleErrs",null);return b.try(()=>U((0,e._)`await `),L=>b.assign($,!1).if((0,e._)`${L} instanceof ${O.ValidationError}`,()=>b.assign(M,(0,e._)`${L}.errors`),()=>b.throw(L))),M}function I(){const M=(0,e._)`${x}.errors`;return b.assign(M,null),U(e.nil),M}function U(M=m.async?(0,e._)`await `:e.nil){const L=O.opts.passContext?t.default.this:t.default.self,K=!("compile"in m&&!A||m.schema===!1);b.assign($,(0,e._)`${M}${(0,r.callValidateCode)(h,x,L,K)}`,m.modifying)}function q(M){var L;b.if((0,e.not)((L=m.valid)!==null&&L!==void 0?L:$),M)}}Jt.funcKeywordCode=s;function a(h){const{gen:m,data:g,it:b}=h;m.if(b.parentData,()=>m.assign(g,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function o(h,m){const{gen:g}=h;g.if((0,e._)`Array.isArray(${m})`,()=>{g.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${m} : ${t.default.vErrors}.concat(${m})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function l({schemaEnv:h},m){if(m.async&&!h.$async)throw new Error("async keyword in sync schema")}function c(h,m,g){if(g===void 0)throw new Error(`keyword "${m}" failed to compile`);return h.scopeValue("keyword",typeof g=="function"?{ref:g}:{ref:g,code:(0,e.stringify)(g)})}function u(h,m,g=!1){return!m.length||m.some(b=>b==="array"?Array.isArray(h):b==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==b||g&&typeof h>"u")}Jt.validSchemaType=u;function d({schema:h,opts:m,self:g,errSchemaPath:b},v,y){if(Array.isArray(v.keyword)?!v.keyword.includes(y):v.keyword!==y)throw new Error("ajv implementation error");const f=v.dependencies;if(f?.some(A=>!Object.prototype.hasOwnProperty.call(h,A)))throw new Error(`parent schema must have dependencies of ${y}: ${f.join(",")}`);if(v.validateSchema&&!v.validateSchema(h[y])){const O=`keyword "${y}" value is invalid at path "${b}": `+g.errorsText(v.validateSchema.errors);if(m.validateSchema==="log")g.logger.error(O);else throw new Error(O)}}return Jt.validateKeywordUsage=d,Jt}var mr={},Gc;function Vv(){if(Gc)return mr;Gc=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.extendSubschemaMode=mr.extendSubschemaData=mr.getSubschema=void 0;const e=je(),t=Re();function r(s,{keyword:a,schemaProp:o,schema:l,schemaPath:c,errSchemaPath:u,topSchemaRef:d}){if(a!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const h=s.schema[a];return o===void 0?{schema:h,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:h[o],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0,t.escapeFragment)(o)}`}}if(l!==void 0){if(c===void 0||u===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:c,topSchemaRef:d,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}mr.getSubschema=r;function n(s,a,{dataProp:o,dataPropType:l,data:c,dataTypes:u,propertyName:d}){if(c!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=a;if(o!==void 0){const{errorPath:g,dataPathArr:b,opts:v}=a,y=h.let("data",(0,e._)`${a.data}${(0,e.getProperty)(o)}`,!0);m(y),s.errorPath=(0,e.str)`${g}${(0,t.getErrorPath)(o,l,v.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${o}`,s.dataPathArr=[...b,s.parentDataProperty]}if(c!==void 0){const g=c instanceof e.Name?c:h.let("data",c,!0);m(g),d!==void 0&&(s.propertyName=d)}u&&(s.dataTypes=u);function m(g){s.data=g,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,g]}}mr.extendSubschemaData=n;function i(s,{jtdDiscriminator:a,jtdMetadata:o,compositeRule:l,createErrors:c,allErrors:u}){l!==void 0&&(s.compositeRule=l),c!==void 0&&(s.createErrors=c),u!==void 0&&(s.allErrors=u),s.jtdDiscriminator=a,s.jtdMetadata=o}return mr.extendSubschemaMode=i,mr}var wt={},Ma,Jc;function vf(){return Jc||(Jc=1,Ma=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ma}var Ua={exports:{}},Yc;function zv(){if(Yc)return Ua.exports;Yc=1;var e=Ua.exports=function(n,i,s){typeof i=="function"&&(s=i,i={}),s=i.cb||s;var a=typeof s=="function"?s:s.pre||function(){},o=s.post||function(){};t(i,a,o,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,i,s,a,o,l,c,u,d,h){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,o,l,c,u,d,h);for(var m in a){var g=a[m];if(Array.isArray(g)){if(m in e.arrayKeywords)for(var b=0;b<g.length;b++)t(n,i,s,g[b],o+"/"+m+"/"+b,l,o,m,a,b)}else if(m in e.propsKeywords){if(g&&typeof g=="object")for(var v in g)t(n,i,s,g[v],o+"/"+m+"/"+r(v),l,o,m,a,v)}else(m in e.keywords||n.allKeys&&!(m in e.skipKeywords))&&t(n,i,s,g,o+"/"+m,l,o,m,a)}s(a,o,l,c,u,d,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Ua.exports}var Zc;function Js(){if(Zc)return wt;Zc=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getSchemaRefs=wt.resolveUrl=wt.normalizeId=wt._getFullPath=wt.getFullPath=wt.inlineRef=void 0;const e=Re(),t=vf(),r=zv(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(b,v=!0){return typeof b=="boolean"?!0:v===!0?!a(b):v?o(b)<=v:!1}wt.inlineRef=i;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(b){for(const v in b){if(s.has(v))return!0;const y=b[v];if(Array.isArray(y)&&y.some(a)||typeof y=="object"&&a(y))return!0}return!1}function o(b){let v=0;for(const y in b){if(y==="$ref")return 1/0;if(v++,!n.has(y)&&(typeof b[y]=="object"&&(0,e.eachItem)(b[y],f=>v+=o(f)),v===1/0))return 1/0}return v}function l(b,v="",y){y!==!1&&(v=d(v));const f=b.parse(v);return c(b,f)}wt.getFullPath=l;function c(b,v){return b.serialize(v).split("#")[0]+"#"}wt._getFullPath=c;const u=/#\/?$/;function d(b){return b?b.replace(u,""):""}wt.normalizeId=d;function h(b,v,y){return y=d(y),b.resolve(v,y)}wt.resolveUrl=h;const m=/^[a-z_][-a-z0-9._]*$/i;function g(b,v){if(typeof b=="boolean")return{};const{schemaId:y,uriResolver:f}=this.opts,A=d(b[y]||v),O={"":A},p=l(f,A,!1),x={},$=new Set;return r(b,{allKeys:!0},(I,U,q,M)=>{if(M===void 0)return;const L=p+U;let K=O[M];typeof I[y]=="string"&&(K=B.call(this,I[y])),Q.call(this,I.$anchor),Q.call(this,I.$dynamicAnchor),O[U]=K;function B(X){const re=this.opts.uriResolver.resolve;if(X=d(K?re(K,X):X),$.has(X))throw N(X);$.add(X);let E=this.refs[X];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?k(I,E.schema,X):X!==d(L)&&(X[0]==="#"?(k(I,x[X],X),x[X]=I):this.refs[X]=L),X}function Q(X){if(typeof X=="string"){if(!m.test(X))throw new Error(`invalid anchor "${X}"`);B.call(this,`#${X}`)}}}),x;function k(I,U,q){if(U!==void 0&&!t(I,U))throw N(q)}function N(I){return new Error(`reference "${I}" resolves to more than one schema`)}}return wt.getSchemaRefs=g,wt}var Qc;function Ys(){if(Qc)return fr;Qc=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.getData=fr.KeywordCxt=fr.validateFunctionCode=void 0;const e=Uv(),t=Ms(),r=gf(),n=Ms(),i=qv(),s=Lv(),a=Vv(),o=je(),l=zr(),c=Js(),u=Re(),d=Gs();function h(F){if(p(F)&&($(F),O(F))){v(F);return}m(F,()=>(0,e.topBoolOrEmptySchema)(F))}fr.validateFunctionCode=h;function m({gen:F,validateName:V,schema:z,schemaEnv:J,opts:Y},Z){Y.code.es5?F.func(V,(0,o._)`${l.default.data}, ${l.default.valCxt}`,J.$async,()=>{F.code((0,o._)`"use strict"; ${f(z,Y)}`),b(F,Y),F.code(Z)}):F.func(V,(0,o._)`${l.default.data}, ${g(Y)}`,J.$async,()=>F.code(f(z,Y)).code(Z))}function g(F){return(0,o._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${F.dynamicRef?(0,o._)`, ${l.default.dynamicAnchors}={}`:o.nil}}={}`}function b(F,V){F.if(l.default.valCxt,()=>{F.var(l.default.instancePath,(0,o._)`${l.default.valCxt}.${l.default.instancePath}`),F.var(l.default.parentData,(0,o._)`${l.default.valCxt}.${l.default.parentData}`),F.var(l.default.parentDataProperty,(0,o._)`${l.default.valCxt}.${l.default.parentDataProperty}`),F.var(l.default.rootData,(0,o._)`${l.default.valCxt}.${l.default.rootData}`),V.dynamicRef&&F.var(l.default.dynamicAnchors,(0,o._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{F.var(l.default.instancePath,(0,o._)`""`),F.var(l.default.parentData,(0,o._)`undefined`),F.var(l.default.parentDataProperty,(0,o._)`undefined`),F.var(l.default.rootData,l.default.data),V.dynamicRef&&F.var(l.default.dynamicAnchors,(0,o._)`{}`)})}function v(F){const{schema:V,opts:z,gen:J}=F;m(F,()=>{z.$comment&&V.$comment&&M(F),I(F),J.let(l.default.vErrors,null),J.let(l.default.errors,0),z.unevaluated&&y(F),k(F),L(F)})}function y(F){const{gen:V,validateName:z}=F;F.evaluated=V.const("evaluated",(0,o._)`${z}.evaluated`),V.if((0,o._)`${F.evaluated}.dynamicProps`,()=>V.assign((0,o._)`${F.evaluated}.props`,(0,o._)`undefined`)),V.if((0,o._)`${F.evaluated}.dynamicItems`,()=>V.assign((0,o._)`${F.evaluated}.items`,(0,o._)`undefined`))}function f(F,V){const z=typeof F=="object"&&F[V.schemaId];return z&&(V.code.source||V.code.process)?(0,o._)`/*# sourceURL=${z} */`:o.nil}function A(F,V){if(p(F)&&($(F),O(F))){x(F,V);return}(0,e.boolOrEmptySchema)(F,V)}function O({schema:F,self:V}){if(typeof F=="boolean")return!F;for(const z in F)if(V.RULES.all[z])return!0;return!1}function p(F){return typeof F.schema!="boolean"}function x(F,V){const{schema:z,gen:J,opts:Y}=F;Y.$comment&&z.$comment&&M(F),U(F),q(F);const Z=J.const("_errs",l.default.errors);k(F,Z),J.var(V,(0,o._)`${Z} === ${l.default.errors}`)}function $(F){(0,u.checkUnknownRules)(F),N(F)}function k(F,V){if(F.opts.jtd)return B(F,[],!1,V);const z=(0,t.getSchemaTypes)(F.schema),J=(0,t.coerceAndCheckDataType)(F,z);B(F,z,!J,V)}function N(F){const{schema:V,errSchemaPath:z,opts:J,self:Y}=F;V.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(V,Y.RULES)&&Y.logger.warn(`$ref: keywords ignored in schema at path "${z}"`)}function I(F){const{schema:V,opts:z}=F;V.default!==void 0&&z.useDefaults&&z.strictSchema&&(0,u.checkStrictMode)(F,"default is ignored in the schema root")}function U(F){const V=F.schema[F.opts.schemaId];V&&(F.baseId=(0,c.resolveUrl)(F.opts.uriResolver,F.baseId,V))}function q(F){if(F.schema.$async&&!F.schemaEnv.$async)throw new Error("async schema in sync schema")}function M({gen:F,schemaEnv:V,schema:z,errSchemaPath:J,opts:Y}){const Z=z.$comment;if(Y.$comment===!0)F.code((0,o._)`${l.default.self}.logger.log(${Z})`);else if(typeof Y.$comment=="function"){const te=(0,o.str)`${J}/$comment`,ie=F.scopeValue("root",{ref:V.root});F.code((0,o._)`${l.default.self}.opts.$comment(${Z}, ${te}, ${ie}.schema)`)}}function L(F){const{gen:V,schemaEnv:z,validateName:J,ValidationError:Y,opts:Z}=F;z.$async?V.if((0,o._)`${l.default.errors} === 0`,()=>V.return(l.default.data),()=>V.throw((0,o._)`new ${Y}(${l.default.vErrors})`)):(V.assign((0,o._)`${J}.errors`,l.default.vErrors),Z.unevaluated&&K(F),V.return((0,o._)`${l.default.errors} === 0`))}function K({gen:F,evaluated:V,props:z,items:J}){z instanceof o.Name&&F.assign((0,o._)`${V}.props`,z),J instanceof o.Name&&F.assign((0,o._)`${V}.items`,J)}function B(F,V,z,J){const{gen:Y,schema:Z,data:te,allErrors:ie,opts:ae,self:de}=F,{RULES:ge}=de;if(Z.$ref&&(ae.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(Z,ge))){Y.block(()=>D(F,"$ref",ge.all.$ref.definition));return}ae.jtd||X(F,V),Y.block(()=>{for(const Ce of ge.rules)ue(Ce);ue(ge.post)});function ue(Ce){(0,r.shouldUseGroup)(Z,Ce)&&(Ce.type?(Y.if((0,n.checkDataType)(Ce.type,te,ae.strictNumbers)),Q(F,Ce),V.length===1&&V[0]===Ce.type&&z&&(Y.else(),(0,n.reportTypeError)(F)),Y.endIf()):Q(F,Ce),ie||Y.if((0,o._)`${l.default.errors} === ${J||0}`))}}function Q(F,V){const{gen:z,schema:J,opts:{useDefaults:Y}}=F;Y&&(0,i.assignDefaults)(F,V.type),z.block(()=>{for(const Z of V.rules)(0,r.shouldUseRule)(J,Z)&&D(F,Z.keyword,Z.definition,V.type)})}function X(F,V){F.schemaEnv.meta||!F.opts.strictTypes||(re(F,V),F.opts.allowUnionTypes||E(F,V),_(F,F.dataTypes))}function re(F,V){if(V.length){if(!F.dataTypes.length){F.dataTypes=V;return}V.forEach(z=>{C(F.dataTypes,z)||j(F,`type "${z}" not allowed by context "${F.dataTypes.join(",")}"`)}),S(F,V)}}function E(F,V){V.length>1&&!(V.length===2&&V.includes("null"))&&j(F,"use allowUnionTypes to allow union type keyword")}function _(F,V){const z=F.self.RULES.all;for(const J in z){const Y=z[J];if(typeof Y=="object"&&(0,r.shouldUseRule)(F.schema,Y)){const{type:Z}=Y.definition;Z.length&&!Z.some(te=>P(V,te))&&j(F,`missing type "${Z.join(",")}" for keyword "${J}"`)}}}function P(F,V){return F.includes(V)||V==="number"&&F.includes("integer")}function C(F,V){return F.includes(V)||V==="integer"&&F.includes("number")}function S(F,V){const z=[];for(const J of F.dataTypes)C(V,J)?z.push(J):V.includes("integer")&&J==="number"&&z.push("integer");F.dataTypes=z}function j(F,V){const z=F.schemaEnv.baseId+F.errSchemaPath;V+=` at "${z}" (strictTypes)`,(0,u.checkStrictMode)(F,V,F.opts.strictTypes)}class R{constructor(V,z,J){if((0,s.validateKeywordUsage)(V,z,J),this.gen=V.gen,this.allErrors=V.allErrors,this.keyword=J,this.data=V.data,this.schema=V.schema[J],this.$data=z.$data&&V.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(V,this.schema,J,this.$data),this.schemaType=z.schemaType,this.parentSchema=V.schema,this.params={},this.it=V,this.def=z,this.$data)this.schemaCode=V.gen.const("vSchema",W(this.$data,V));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,z.schemaType,z.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(z.schemaType)}`);("code"in z?z.trackErrors:z.errors!==!1)&&(this.errsCount=V.gen.const("_errs",l.default.errors))}result(V,z,J){this.failResult((0,o.not)(V),z,J)}failResult(V,z,J){this.gen.if(V),J?J():this.error(),z?(this.gen.else(),z(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(V,z){this.failResult((0,o.not)(V),void 0,z)}fail(V){if(V===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(V),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(V){if(!this.$data)return this.fail(V);const{schemaCode:z}=this;this.fail((0,o._)`${z} !== undefined && (${(0,o.or)(this.invalid$data(),V)})`)}error(V,z,J){if(z){this.setParams(z),this._error(V,J),this.setParams({});return}this._error(V,J)}_error(V,z){(V?d.reportExtraError:d.reportError)(this,this.def.error,z)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(V){this.allErrors||this.gen.if(V)}setParams(V,z){z?Object.assign(this.params,V):this.params=V}block$data(V,z,J=o.nil){this.gen.block(()=>{this.check$data(V,J),z()})}check$data(V=o.nil,z=o.nil){if(!this.$data)return;const{gen:J,schemaCode:Y,schemaType:Z,def:te}=this;J.if((0,o.or)((0,o._)`${Y} === undefined`,z)),V!==o.nil&&J.assign(V,!0),(Z.length||te.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),V!==o.nil&&J.assign(V,!1)),J.else()}invalid$data(){const{gen:V,schemaCode:z,schemaType:J,def:Y,it:Z}=this;return(0,o.or)(te(),ie());function te(){if(J.length){if(!(z instanceof o.Name))throw new Error("ajv implementation error");const ae=Array.isArray(J)?J:[J];return(0,o._)`${(0,n.checkDataTypes)(ae,z,Z.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function ie(){if(Y.validateSchema){const ae=V.scopeValue("validate$data",{ref:Y.validateSchema});return(0,o._)`!${ae}(${z})`}return o.nil}}subschema(V,z){const J=(0,a.getSubschema)(this.it,V);(0,a.extendSubschemaData)(J,this.it,V),(0,a.extendSubschemaMode)(J,V);const Y={...this.it,...J,items:void 0,props:void 0};return A(Y,z),Y}mergeEvaluated(V,z){const{it:J,gen:Y}=this;J.opts.unevaluated&&(J.props!==!0&&V.props!==void 0&&(J.props=u.mergeEvaluated.props(Y,V.props,J.props,z)),J.items!==!0&&V.items!==void 0&&(J.items=u.mergeEvaluated.items(Y,V.items,J.items,z)))}mergeValidEvaluated(V,z){const{it:J,gen:Y}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return Y.if(z,()=>this.mergeEvaluated(V,o.Name)),!0}}fr.KeywordCxt=R;function D(F,V,z,J){const Y=new R(F,z,V);"code"in z?z.code(Y,J):Y.$data&&z.validate?(0,s.funcKeywordCode)(Y,z):"macro"in z?(0,s.macroKeywordCode)(Y,z):(z.compile||z.validate)&&(0,s.funcKeywordCode)(Y,z)}const H=/^\/(?:[^~]|~0|~1)*$/,T=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(F,{dataLevel:V,dataNames:z,dataPathArr:J}){let Y,Z;if(F==="")return l.default.rootData;if(F[0]==="/"){if(!H.test(F))throw new Error(`Invalid JSON-pointer: ${F}`);Y=F,Z=l.default.rootData}else{const de=T.exec(F);if(!de)throw new Error(`Invalid JSON-pointer: ${F}`);const ge=+de[1];if(Y=de[2],Y==="#"){if(ge>=V)throw new Error(ae("property/index",ge));return J[V-ge]}if(ge>V)throw new Error(ae("data",ge));if(Z=z[V-ge],!Y)return Z}let te=Z;const ie=Y.split("/");for(const de of ie)de&&(Z=(0,o._)`${Z}${(0,o.getProperty)((0,u.unescapeJsonPointer)(de))}`,te=(0,o._)`${te} && ${Z}`);return te;function ae(de,ge){return`Cannot access ${de} ${ge} levels up, current level is ${V}`}}return fr.getData=W,fr}var Pi={},Xc;function Bo(){if(Xc)return Pi;Xc=1,Object.defineProperty(Pi,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Pi.default=e,Pi}var Ni={},eu;function Zs(){if(eu)return Ni;eu=1,Object.defineProperty(Ni,"__esModule",{value:!0});const e=Js();class t extends Error{constructor(n,i,s,a){super(a||`can't resolve reference ${s} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Ni.default=t,Ni}var Pt={},tu;function Ko(){if(tu)return Pt;tu=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.resolveSchema=Pt.getCompilingSchema=Pt.resolveRef=Pt.compileSchema=Pt.SchemaEnv=void 0;const e=je(),t=Bo(),r=zr(),n=Js(),i=Re(),s=Ys();class a{constructor(y){var f;this.refs={},this.dynamicAnchors={};let A;typeof y.schema=="object"&&(A=y.schema),this.schema=y.schema,this.schemaId=y.schemaId,this.root=y.root||this,this.baseId=(f=y.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(A?.[y.schemaId||"$id"]),this.schemaPath=y.schemaPath,this.localRefs=y.localRefs,this.meta=y.meta,this.$async=A?.$async,this.refs={}}}Pt.SchemaEnv=a;function o(v){const y=u.call(this,v);if(y)return y;const f=(0,n.getFullPath)(this.opts.uriResolver,v.root.baseId),{es5:A,lines:O}=this.opts.code,{ownProperties:p}=this.opts,x=new e.CodeGen(this.scope,{es5:A,lines:O,ownProperties:p});let $;v.$async&&($=x.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const k=x.scopeName("validate");v.validateName=k;const N={gen:x,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:x.scopeValue("schema",this.opts.code.source===!0?{ref:v.schema,code:(0,e.stringify)(v.schema)}:{ref:v.schema}),validateName:k,ValidationError:$,schema:v.schema,schemaEnv:v,rootId:f,baseId:v.baseId||f,schemaPath:e.nil,errSchemaPath:v.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let I;try{this._compilations.add(v),(0,s.validateFunctionCode)(N),x.optimize(this.opts.code.optimize);const U=x.toString();I=`${x.scopeRefs(r.default.scope)}return ${U}`,this.opts.code.process&&(I=this.opts.code.process(I,v));const M=new Function(`${r.default.self}`,`${r.default.scope}`,I)(this,this.scope.get());if(this.scope.value(k,{ref:M}),M.errors=null,M.schema=v.schema,M.schemaEnv=v,v.$async&&(M.$async=!0),this.opts.code.source===!0&&(M.source={validateName:k,validateCode:U,scopeValues:x._values}),this.opts.unevaluated){const{props:L,items:K}=N;M.evaluated={props:L instanceof e.Name?void 0:L,items:K instanceof e.Name?void 0:K,dynamicProps:L instanceof e.Name,dynamicItems:K instanceof e.Name},M.source&&(M.source.evaluated=(0,e.stringify)(M.evaluated))}return v.validate=M,v}catch(U){throw delete v.validate,delete v.validateName,I&&this.logger.error("Error compiling schema, function code:",I),U}finally{this._compilations.delete(v)}}Pt.compileSchema=o;function l(v,y,f){var A;f=(0,n.resolveUrl)(this.opts.uriResolver,y,f);const O=v.refs[f];if(O)return O;let p=h.call(this,v,f);if(p===void 0){const x=(A=v.localRefs)===null||A===void 0?void 0:A[f],{schemaId:$}=this.opts;x&&(p=new a({schema:x,schemaId:$,root:v,baseId:y}))}if(p!==void 0)return v.refs[f]=c.call(this,p)}Pt.resolveRef=l;function c(v){return(0,n.inlineRef)(v.schema,this.opts.inlineRefs)?v.schema:v.validate?v:o.call(this,v)}function u(v){for(const y of this._compilations)if(d(y,v))return y}Pt.getCompilingSchema=u;function d(v,y){return v.schema===y.schema&&v.root===y.root&&v.baseId===y.baseId}function h(v,y){let f;for(;typeof(f=this.refs[y])=="string";)y=f;return f||this.schemas[y]||m.call(this,v,y)}function m(v,y){const f=this.opts.uriResolver.parse(y),A=(0,n._getFullPath)(this.opts.uriResolver,f);let O=(0,n.getFullPath)(this.opts.uriResolver,v.baseId,void 0);if(Object.keys(v.schema).length>0&&A===O)return b.call(this,f,v);const p=(0,n.normalizeId)(A),x=this.refs[p]||this.schemas[p];if(typeof x=="string"){const $=m.call(this,v,x);return typeof $?.schema!="object"?void 0:b.call(this,f,$)}if(typeof x?.schema=="object"){if(x.validate||o.call(this,x),p===(0,n.normalizeId)(y)){const{schema:$}=x,{schemaId:k}=this.opts,N=$[k];return N&&(O=(0,n.resolveUrl)(this.opts.uriResolver,O,N)),new a({schema:$,schemaId:k,root:v,baseId:O})}return b.call(this,f,x)}}Pt.resolveSchema=m;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(v,{baseId:y,schema:f,root:A}){var O;if(((O=v.fragment)===null||O===void 0?void 0:O[0])!=="/")return;for(const $ of v.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const k=f[(0,i.unescapeFragment)($)];if(k===void 0)return;f=k;const N=typeof f=="object"&&f[this.opts.schemaId];!g.has($)&&N&&(y=(0,n.resolveUrl)(this.opts.uriResolver,y,N))}let p;if(typeof f!="boolean"&&f.$ref&&!(0,i.schemaHasRulesButRef)(f,this.RULES)){const $=(0,n.resolveUrl)(this.opts.uriResolver,y,f.$ref);p=m.call(this,A,$)}const{schemaId:x}=this.opts;if(p=p||new a({schema:f,schemaId:x,root:A,baseId:y}),p.schema!==p.root.schema)return p}return Pt}const Bv="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Kv="Meta-schema for $data reference (JSON AnySchema extension proposal)",Hv="object",Wv=["$data"],Gv={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Jv=!1,Yv={$id:Bv,description:Kv,type:Hv,required:Wv,properties:Gv,additionalProperties:Jv};var Fi={},ti={exports:{}},qa,ru;function bf(){if(ru)return qa;ru=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=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),r=RegExp.prototype.test.bind(/^\d*$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),a=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),o=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),l=new Array(256);{const E="0123456789ABCDEF";for(let _=0;_<256;_++)l[_]="%"+E[_>>4]+E[_&15]}function c(E){return E<2048?l[192|E>>6]+l[128|E&63]:E<65536?l[224|E>>12]+l[128|E>>6&63]+l[128|E&63]:l[240|E>>18]+l[128|E>>12&63]+l[128|E>>6&63]+l[128|E&63]}function u(E){let _="",P=0,C=0;for(C=0;C<E.length;C++)if(P=E[C].charCodeAt(0),P!==48){if(!(P>=48&&P<=57||P>=65&&P<=70||P>=97&&P<=102))return"";_+=E[C];break}for(C+=1;C<E.length;C++){if(P=E[C].charCodeAt(0),!(P>=48&&P<=57||P>=65&&P<=70||P>=97&&P<=102))return"";_+=E[C]}return _}const d=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),h=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),m=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),g=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function b(E){if(E.length===0)return!1;for(let _=0;_<E.length;_++)if(!m(E[_])){if(E[_]==="%"&&_+2<E.length&&n(E.slice(_+1,_+3))){_+=2;continue}return!1}return!0}function v(E){let _=-1,P=0,C=-1,S=0;for(let D=0;D<E.length;D++)E[D]==="0"?(C===-1&&(C=D),S++,S>P&&(P=S,_=C)):(C=-1,S=0);if(P<2)return E.join(":");const j=E.slice(0,_).join(":"),R=E.slice(_+P).join(":");return j+"::"+R}function y(E){const _=E.indexOf("::");if(_!==-1&&E.indexOf("::",_+1)!==-1)return;const P=_===-1?E.split(":"):E.slice(0,_).split(":"),C=_===-1?[]:E.slice(_+2).split(":");_!==-1&&(P.length===1&&P[0]===""&&(P.length=0),C.length===1&&C[0]===""&&(C.length=0));const S=P.concat(C);let j=0;for(let D=0;D<S.length;D++){const H=S[D];if(H==="")return;if(H.indexOf(".")!==-1){if(D!==S.length-1||_!==-1&&C.length===0||!t(H))return;j+=2;continue}if(!d(H))return;S[D]=parseInt(H,16).toString(16),j++}if(_===-1)return j!==8?void 0:v(S);if(j>=8)return;const R=S.slice(0,P.length);for(let D=j;D<8;D++)R.push("0");for(let D=P.length;D<S.length;D++)R.push(S[D]);return v(R)}function f(E){const _=E[0]==="["&&E[E.length-1]==="]";if((E[0]==="["||E[E.length-1]==="]")&&!_)return{host:E,isIPV6:!1,error:!0};let C=_?E.slice(1,-1):E;if(_&&h(C))return C=C.toLowerCase(),{host:`[${C}]`,escapedHost:C,isIPV6:!1,isIPVFuture:!0};if(A(C,":")<2)return{host:E,isIPV6:!1,error:_};let S="";const j=C.indexOf("%");if(j!==-1){const D=C.slice(j,j+3).toLowerCase()==="%25"?3:1;if(S=C.slice(j+D),!b(S))return{host:E,isIPV6:!1,error:!0};C=C.slice(0,j)}const R=y(C);return R===void 0?{host:E,isIPV6:!1,error:!0}:{host:R+(S?"%"+S:""),escapedHost:R+(S?"%25"+S:""),isIPV6:!0}}function A(E,_){let P=0;for(let C=0;C<E.length;C++)E[C]===_&&P++;return P}function O(E){let _=E;const P=[];let C=-1,S=0;for(;S=_.length;){if(S===1){if(_===".")break;if(_==="/"){P.push("/");break}else{P.push(_);break}}else if(S===2){if(_[0]==="."){if(_[1]===".")break;if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&(_[1]==="."||_[1]==="/")){P.push("/");break}}else if(S===3&&_==="/.."){P.length!==0&&P.pop(),P.push("/");break}if(_[0]==="."){if(_[1]==="."){if(_[2]==="/"){_=_.slice(3);continue}}else if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&_[1]==="."){if(_[2]==="/"){_=_.slice(2);continue}else if(_[2]==="."&&_[3]==="/"){_=_.slice(3),P.length!==0&&P.pop();continue}}if((C=_.indexOf("/",1))===-1){P.push(_);break}else P.push(_.slice(0,C)),_=_.slice(C)}return P.join("")}const p={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},x=/[@/?#:]/g,$=/[@/?#]/g;function k(E,_){const P=_?$:x;return P.lastIndex=0,E.replace(P,C=>p[C])}function N(E,_=!1){if(E.indexOf("%")===-1)return E;let P="";for(let C=0;C<E.length;C++){if(E[C]==="%"&&C+2<E.length){const S=E.slice(C+1,C+3);if(n(S)){const j=S.toUpperCase(),R=String.fromCharCode(parseInt(j,16));_&&i(R)?P+=R:P+="%"+j,C+=2;continue}}P+=E[C]}return P}function I(E){let _="";for(let P=0;P<E.length;P++){const C=E[P];if(C==="%"&&P+2<E.length){const S=E.slice(P+1,P+3);if(n(S)){const j=S.toUpperCase(),R=String.fromCharCode(parseInt(j,16));R!=="."&&i(R)?_+=R:_+="%"+j,P+=2;continue}}if(s(C))_+=C;else{const S=E.charCodeAt(P);if(S<128)_+=B(S)?C:l[S];else if(S<55296||S>57343)_+=c(S);else if(S<=56319&&P+1<E.length){const j=E.charCodeAt(P+1);j>=56320&&j<=57343?(_+=c(65536+(S-55296<<10)+(j-56320)),P++):_+=c(65533)}else _+=c(65533)}}return _}function U(E,_=!1){let P="",C=_&&E[0]!=="/";for(let S=0;S<E.length;S++){const j=E[S];if(j==="%"&&S+2<E.length){const R=E.slice(S+1,S+3);if(n(R)){P+="%"+R.toUpperCase(),S+=2;continue}}if(j==="/"&&(C=!1),s(j)&&(j!==":"||!C))P+=j;else{const R=E.charCodeAt(S);if(R<128)P+=l[R];else if(R<55296||R>57343)P+=c(R);else if(R<=56319&&S+1<E.length){const D=E.charCodeAt(S+1);D>=56320&&D<=57343?(P+=c(65536+(R-55296<<10)+(D-56320)),S++):P+=c(65533)}else P+=c(65533)}}return P}function q(E,_){let P="";for(let C=0;C<E.length;C++){const S=E[C];if(S==="%"&&C+2<E.length){const j=E.slice(C+1,C+3);if(n(j)){P+="%"+j.toUpperCase(),C+=2;continue}}if(_(S))P+=S;else{const j=E.charCodeAt(C);if(j<128)P+=l[j];else if(j<55296||j>57343)P+=c(j);else if(j<=56319&&C+1<E.length){const R=E.charCodeAt(C+1);R>=56320&&R<=57343?(P+=c(65536+(j-55296<<10)+(R-56320)),C++):P+=c(65533)}else P+=c(65533)}}return P}function M(E){return q(E,o)}function L(E){return q(E,a)}function K(E){return q(E,a)}function B(E){return E>=48&&E<=57||E>=65&&E<=90||E>=97&&E<=122||E===42||E===43||E===45||E===46||E===47||E===64||E===95}function Q(E){let _="";for(let P=0;P<E.length;P++){const C=E[P];if(C==="%"&&P+2<E.length){const S=E.slice(P+1,P+3);if(n(S)){const j=S.toUpperCase(),R=String.fromCharCode(parseInt(j,16));i(R)?_+=R:_+="%"+j,P+=2;continue}}if(a(C))_+=C;else{const S=E.charCodeAt(P);if(S<128)_+=B(S)?C:l[S];else if(S<55296||S>57343)_+=c(S);else if(S<=56319&&P+1<E.length){const j=E.charCodeAt(P+1);j>=56320&&j<=57343?(_+=c(65536+(S-55296<<10)+(j-56320)),P++):_+=c(65533)}else _+=c(65533)}}return _}function X(E){let _="";for(let P=0;P<E.length;P++){if(E[P]==="%"&&P+2<E.length){const C=E.slice(P+1,P+3);if(n(C)){_+="%"+C.toUpperCase(),P+=2;continue}}_+=escape(E[P])}return _}function re(E){const _=[];if(E.userinfo!==void 0&&(_.push(M(E.userinfo)),_.push("@")),E.host!==void 0){let P=E.host;if(!t(P)){let C=f(P);C.isIPV6!==!0&&C.isIPVFuture!==!0&&(P=N(P,!0),C=f(P)),C.isIPV6===!0||C.isIPVFuture===!0?P=`[${C.escapedHost}]`:P=k(P,!1)}_.push(P)}if(typeof E.port=="number"||typeof E.port=="string"){const P=String(E.port);if(!r(P))throw new TypeError("URI port is malformed.");_.push(":"),_.push(P)}return _.length?_.join(""):void 0}return qa={nonSimpleDomain:g,recomposeAuthority:re,reescapeHostDelimiters:k,normalizePercentEncoding:N,normalizePathEncoding:I,serializePathEncoding:U,normalizeQueryFragmentEncoding:Q,encodeUserinfo:M,encodeQuery:L,encodeFragment:K,escapePreservingEscapes:X,removeDotSegments:O,isIPv4:t,isUUID:e,normalizeIPv6:f,stringArrayToHexStripped:u},qa}var La,nu;function Zv(){if(nu)return La;nu=1;const{isUUID:e}=bf(),t=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(p){return r.indexOf(p)!==-1}function i(p){return p.secure===!0?!0:p.secure===!1?!1:p.scheme?p.scheme.length===3&&(p.scheme[0]==="w"||p.scheme[0]==="W")&&(p.scheme[1]==="s"||p.scheme[1]==="S")&&(p.scheme[2]==="s"||p.scheme[2]==="S"):!1}function s(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function a(p){const x=String(p.scheme).toLowerCase()==="https";return(p.port===(x?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function o(p){return p.secure=i(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function l(p){if((p.port===(i(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const x=p.resourceName.indexOf("?"),$=x===-1?p.resourceName:p.resourceName.slice(0,x);p.path=$&&$!=="/"?$:void 0,p.query=x===-1?void 0:p.resourceName.slice(x+1),p.resourceName=void 0}return p.fragment=void 0,p}function c(p,x){if(!p.path)return p.error="URN can not be parsed",p;const $=p.path.match(t);if($&&$[0]===p.path){const k=x.scheme||p.scheme||"urn";p.nid=$[1].toLowerCase(),p.nss=$[2];const N=`${k}:${x.nid||p.nid}`,I=O(N);p.path=void 0,I&&(p=I.parse(p,x))}else p.error=p.error||"URN can not be parsed.";return p}function u(p,x){if(p.nid===void 0)throw new Error("URN without nid cannot be serialized");const $=x.scheme||p.scheme||"urn",k=p.nid.toLowerCase(),N=`${$}:${x.nid||k}`,I=O(N);I&&(p=I.serialize(p,x));const U=p,q=p.nss;return U.path=`${k||x.nid}:${q}`,x.skipEscape=!0,U}function d(p,x){const $=p;return $.uuid=$.nss,$.nss=void 0,!x.tolerant&&(!$.uuid||!e($.uuid))&&($.error=$.error||"UUID is not valid."),$}function h(p){const x=p;return x.nss=(p.uuid||"").toLowerCase(),x}const m={scheme:"http",domainHost:!0,parse:s,serialize:a},g={scheme:"https",domainHost:m.domainHost,parse:s,serialize:a},b={scheme:"ws",domainHost:!0,parse:o,serialize:l},v={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},A={http:m,https:g,ws:b,wss:v,urn:{scheme:"urn",parse:c,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(A,null);function O(p){return p&&(A[p]||A[p.toLowerCase()])||void 0}return La={wsIsSecure:i,SCHEMES:A,isValidSchemeName:n,getSchemeHandler:O},La}var iu;function Qv(){if(iu)return ti.exports;iu=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizePercentEncoding:n,normalizePathEncoding:i,serializePathEncoding:s,normalizeQueryFragmentEncoding:a,encodeQuery:o,encodeFragment:l,reescapeHostDelimiters:c,isIPv4:u,nonSimpleDomain:d}=bf(),{SCHEMES:h,getSchemeHandler:m}=Zv(),g=/^[A-Za-z][A-Za-z0-9+.-]*$/u,b="URI scheme is malformed.";function v(E){const _=unescape(String(E));if(!g.test(_))throw new TypeError(b);return _}function y(E,_){return typeof E=="string"?E=B(E,_):typeof E=="object"&&(E=K(p(E,_),_)),E}function f(E,_,P){const C=P?Object.assign({scheme:"null"},P):{scheme:"null"},{parsed:S,malformedAuthorityOrPort:j,malformedPercentEncoding:R,malformedSchemeSpecific:D,malformedHost:H,malformedScheme:T}=L(E,C),{parsed:W,malformedAuthorityOrPort:F,malformedPercentEncoding:V,malformedSchemeSpecific:z,malformedHost:J,malformedScheme:Y}=L(_,C);if(j||F||R||V||D||z||H||J||T||Y)throw new Error(S.error||W.error||"URI is malformed.");const Z=A(S,W,C,!0),te=m(P&&P.scheme||Z.scheme),ie=Z.host,ae=ie!==void 0&&ie!==""&&(u(ie)||e(ie).isIPV6);M(Z,P||{},te,ae);const de=ie&&ie.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(ie);if(Z.error&&!de)throw new Error(Z.error);return C.skipEscape=!0,p(Z,C)}function A(E,_,P,C){const S={};return C||(E=K(p(E,P),P),_=K(p(_,P),P)),P=P||{},!P.tolerant&&_.scheme?(S.scheme=_.scheme,S.userinfo=_.userinfo,S.host=_.host,S.port=_.port,S.path=t(_.path||""),S.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(S.userinfo=_.userinfo,S.host=_.host,S.port=_.port,S.path=t(_.path||""),S.query=_.query):(_.path?(_.path[0]==="/"?S.path=t(_.path):((E.userinfo!==void 0||E.host!==void 0||E.port!==void 0)&&!E.path?S.path="/"+_.path:E.path?S.path=E.path.slice(0,E.path.lastIndexOf("/")+1)+_.path:S.path=_.path,S.path=t(S.path)),S.query=_.query):(S.path=E.path,_.query!==void 0?S.query=_.query:S.query=E.query),S.userinfo=E.userinfo,S.host=E.host,S.port=E.port),S.scheme=E.scheme),S.fragment=_.fragment,S}function O(E,_,P){const C=X(E,P),S=X(_,P);return C!==void 0&&S!==void 0&&C===S}function p(E,_){const P={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:""},C=Object.assign({},_),S=[];P.scheme&&(P.scheme=v(P.scheme));const j=m(C.scheme||P.scheme);j&&j.serialize&&j.serialize(P,C);const R=P.userinfo!==void 0||P.host!==void 0||P.port!==void 0,D=!C.skipEscape&&P.scheme===void 0&&!R;P.path!==void 0&&(C.skipEscape?P.path=n(P.path):P.path=s(P.path,D)),C.reference!=="suffix"&&P.scheme&&(P.scheme=v(P.scheme),S.push(P.scheme,":"));const H=r(P);if(H!==void 0&&(C.reference!=="suffix"&&S.push("//"),S.push(H),P.path&&P.path[0]!=="/"&&S.push("/")),P.path!==void 0){let T=P.path;!C.absolutePath&&(!j||!j.absolutePath)&&(T=t(T)),D&&(T=s(T,!0)),H===void 0&&T[0]==="/"&&T[1]==="/"&&(T="/%2F"+T.slice(2)),S.push(T)}return P.query!==void 0&&S.push("?",o(P.query)),P.fragment!==void 0&&S.push("#",l(P.fragment)),S.join("")}const x=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,$=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,k=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function N(E,_){if(_[2]!==void 0&&E.path&&E.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof E.port=="number"&&(E.port<0||E.port>65535))return"URI port is malformed."}function I(E){if(E===void 0)return!1;let _=E.indexOf("%");for(;_!==-1;){if(_+2>=E.length||!/^[\da-f]{2}$/iu.test(E.slice(_+1,_+3)))return!0;_=E.indexOf("%",_+3)}return!1}function U(E){return E[0]==="["&&E[E.length-1]==="]"}function q(E){const _=E[4];return I(E[3])||_!==void 0&&!U(_)&&I(_)||I(E[6])||I(E[7])||I(E[8])}function M(E,_,P,C){if(!_.unicodeSupport&&(!P||!P.unicodeSupport)&&E.host&&!U(E.host)&&(_.domainHost||P&&P.domainHost)&&C===!1&&d(E.host))try{E.host=new URL("http://"+E.host).hostname}catch(S){return E.error=E.error||"Host's domain name can not be converted to ASCII: "+S,!0}return!1}function L(E,_){const P=Object.assign({},_),C={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let S=!1,j=!1,R=!1,D=!1,H=!1,T=!1,W=!1;P.reference==="suffix"&&(P.scheme?E=P.scheme+":"+E:E="//"+E);const F=E.match($);F!==null&&F[1].indexOf("\\")!==-1&&(C.error="URI authority must not contain a literal backslash.",S=!0);const V=E.match(k);if(V!==null){const J=V[1],Y=J.replace(/[\t\n\r]/g,"");Y.length>=2&&(Y.slice(0,2)!=="//"?(C.error=C.error||"URI authority must not contain a literal backslash.",S=!0):J.length!==Y.length&&(C.error=C.error||"URI authority introducer must not contain whitespace.",S=!0))}const z=E.match(x);if(z){if(C.scheme=z[1],C.userinfo=z[3],C.host=z[4],C.port=parseInt(z[5],10),C.path=z[6]||"",C.query=z[7],C.fragment=z[8],C.scheme!==void 0){const Z=unescape(C.scheme);g.test(Z)?C.scheme=Z.toLowerCase():(C.error=C.error||b,T=!0)}j=q(z),j&&(C.error=C.error||"URI contains malformed percent-encoding."),isNaN(C.port)&&(C.port=z[5]);const J=N(C,z);if(J!==void 0&&(C.error=C.error||J,S=!0),C.host)if(u(C.host)===!1){const te=U(C.host),ie=C.host.indexOf("[")!==-1||C.host.indexOf("]")!==-1,ae=e(C.host);W=ae.isIPV6||ae.isIPVFuture===!0,H=ie&&(!te||ae.error===!0),C.host=W?ae.host:ae.host.toLowerCase(),H&&(C.error=C.error||"URI host is malformed.",S=!0)}else W=!0;C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&C.query===void 0&&!C.path?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",P.reference&&P.reference!=="suffix"&&P.reference!==C.reference&&(C.error=C.error||"URI is not a "+P.reference+" reference.");const Y=m(P.scheme||C.scheme);if(H||(D=M(C,P,Y,W)),E.indexOf("%")!==-1&&C.host!==void 0&&!H){let Z=W?C.host:n(C.host,!0);W||(Z=n(Z.toLowerCase())),C.host=c(Z,W)}(!Y||Y&&!Y.skipNormalize)&&(C.path&&(C.path=i(C.path)),C.query&&(C.query=a(C.query)),C.fragment&&(C.fragment=a(C.fragment))),Y&&Y.parse&&(Y.parse(C,P),Y===h.urn&&C.nid===void 0&&(R=!0))}else C.error=C.error||"URI can not be parsed.";return{parsed:C,malformedAuthorityOrPort:S,malformedPercentEncoding:j,malformedSchemeSpecific:R,malformedHost:D,malformedScheme:T}}function K(E,_){return L(E,_).parsed}function B(E,_){return Q(E,_).normalized}function Q(E,_){const{parsed:P,malformedAuthorityOrPort:C,malformedPercentEncoding:S,malformedSchemeSpecific:j,malformedHost:R,malformedScheme:D}=L(E,_);return{normalized:C||S||j||R||D?E:p(P,_),malformedAuthorityOrPort:C,malformedPercentEncoding:S,malformedSchemeSpecific:j,malformedHost:R,malformedScheme:D}}function X(E,_){if(typeof E!="string"&&typeof E!="object")return;let P;try{P=typeof E=="string"?E:p(E,_)}catch{return}const{normalized:C,malformedAuthorityOrPort:S,malformedPercentEncoding:j,malformedSchemeSpecific:R,malformedHost:D,malformedScheme:H}=Q(P,_);return S||j||R||D||H?void 0:C}const re={SCHEMES:h,normalize:y,resolve:f,resolveComponent:A,equal:O,serialize:p,parse:K};return ti.exports=re,ti.exports.default=re,ti.exports.fastUri=re,ti.exports}var su;function Xv(){if(su)return Fi;su=1,Object.defineProperty(Fi,"__esModule",{value:!0});const e=Qv();return e.code='require("ajv/dist/runtime/uri").default',Fi.default=e,Fi}var au;function eb(){return au||(au=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ys();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=je();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Bo(),i=Zs(),s=yf(),a=Ko(),o=je(),l=Js(),c=Ms(),u=Re(),d=Yv,h=Xv(),m=(E,_)=>new RegExp(E,_);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function A(E){var _,P,C,S,j,R,D,H,T,W,F,V,z,J,Y,Z,te,ie,ae,de,ge,ue,Ce,Pe,fe;const Ye=E.strict,it=(_=E.code)===null||_===void 0?void 0:_.optimize,Se=it===!0||it===void 0?1:it||0,oe=(C=(P=E.code)===null||P===void 0?void 0:P.regExp)!==null&&C!==void 0?C:m,Ne=(S=E.uriResolver)!==null&&S!==void 0?S:h.default;return{strictSchema:(R=(j=E.strictSchema)!==null&&j!==void 0?j:Ye)!==null&&R!==void 0?R:!0,strictNumbers:(H=(D=E.strictNumbers)!==null&&D!==void 0?D:Ye)!==null&&H!==void 0?H:!0,strictTypes:(W=(T=E.strictTypes)!==null&&T!==void 0?T:Ye)!==null&&W!==void 0?W:"log",strictTuples:(V=(F=E.strictTuples)!==null&&F!==void 0?F:Ye)!==null&&V!==void 0?V:"log",strictRequired:(J=(z=E.strictRequired)!==null&&z!==void 0?z:Ye)!==null&&J!==void 0?J:!1,code:E.code?{...E.code,optimize:Se,regExp:oe}:{optimize:Se,regExp:oe},loopRequired:(Y=E.loopRequired)!==null&&Y!==void 0?Y:f,loopEnum:(Z=E.loopEnum)!==null&&Z!==void 0?Z:f,meta:(te=E.meta)!==null&&te!==void 0?te:!0,messages:(ie=E.messages)!==null&&ie!==void 0?ie:!0,inlineRefs:(ae=E.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(de=E.schemaId)!==null&&de!==void 0?de:"$id",addUsedSchema:(ge=E.addUsedSchema)!==null&&ge!==void 0?ge:!0,validateSchema:(ue=E.validateSchema)!==null&&ue!==void 0?ue:!0,validateFormats:(Ce=E.validateFormats)!==null&&Ce!==void 0?Ce:!0,unicodeRegExp:(Pe=E.unicodeRegExp)!==null&&Pe!==void 0?Pe:!0,int32range:(fe=E.int32range)!==null&&fe!==void 0?fe:!0,uriResolver:Ne}}class O{constructor(_={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,_=this.opts={..._,...A(_)};const{es5:P,lines:C}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:b,es5:P,lines:C}),this.logger=q(_.logger);const S=_.validateFormats;_.validateFormats=!1,this.RULES=(0,s.getRules)(),p.call(this,v,_,"NOT SUPPORTED"),p.call(this,y,_,"DEPRECATED","warn"),this._metaOpts=I.call(this),_.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),_.keywords&&N.call(this,_.keywords),typeof _.meta=="object"&&this.addMetaSchema(_.meta),$.call(this),_.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:_,meta:P,schemaId:C}=this.opts;let S=d;C==="id"&&(S={...d},S.id=S.$id,delete S.$id),P&&_&&this.addMetaSchema(S,S[C],!1)}defaultMeta(){const{meta:_,schemaId:P}=this.opts;return this.opts.defaultMeta=typeof _=="object"?_[P]||_:void 0}validate(_,P){let C;if(typeof _=="string"){if(C=this.getSchema(_),!C)throw new Error(`no schema with key or ref "${_}"`)}else C=this.compile(_);const S=C(P);return"$async"in C||(this.errors=C.errors),S}compile(_,P){const C=this._addSchema(_,P);return C.validate||this._compileSchemaEnv(C)}compileAsync(_,P){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:C}=this.opts;return S.call(this,_,P);async function S(W,F){await j.call(this,W.$schema);const V=this._addSchema(W,F);return V.validate||R.call(this,V)}async function j(W){W&&!this.getSchema(W)&&await S.call(this,{$ref:W},!0)}async function R(W){try{return this._compileSchemaEnv(W)}catch(F){if(!(F instanceof i.default))throw F;return D.call(this,F),await H.call(this,F.missingSchema),R.call(this,W)}}function D({missingSchema:W,missingRef:F}){if(this.refs[W])throw new Error(`AnySchema ${W} is loaded but ${F} cannot be resolved`)}async function H(W){const F=await T.call(this,W);this.refs[W]||await j.call(this,F.$schema),this.refs[W]||this.addSchema(F,W,P)}async function T(W){const F=this._loading[W];if(F)return F;try{return await(this._loading[W]=C(W))}finally{delete this._loading[W]}}}addSchema(_,P,C,S=this.opts.validateSchema){if(Array.isArray(_)){for(const R of _)this.addSchema(R,void 0,C,S);return this}let j;if(typeof _=="object"){const{schemaId:R}=this.opts;if(j=_[R],j!==void 0&&typeof j!="string")throw new Error(`schema ${R} must be string`)}return P=(0,l.normalizeId)(P||j),this._checkUnique(P),this.schemas[P]=this._addSchema(_,C,P,S,!0),this}addMetaSchema(_,P,C=this.opts.validateSchema){return this.addSchema(_,P,!0,C),this}validateSchema(_,P){if(typeof _=="boolean")return!0;let C;if(C=_.$schema,C!==void 0&&typeof C!="string")throw new Error("$schema must be a string");if(C=C||this.opts.defaultMeta||this.defaultMeta(),!C)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const S=this.validate(C,_);if(!S&&P){const j="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(j);else throw new Error(j)}return S}getSchema(_){let P;for(;typeof(P=x.call(this,_))=="string";)_=P;if(P===void 0){const{schemaId:C}=this.opts,S=new a.SchemaEnv({schema:{},schemaId:C});if(P=a.resolveSchema.call(this,S,_),!P)return;this.refs[_]=P}return P.validate||this._compileSchemaEnv(P)}removeSchema(_){if(_ instanceof RegExp)return this._removeAllSchemas(this.schemas,_),this._removeAllSchemas(this.refs,_),this;switch(typeof _){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const P=x.call(this,_);return typeof P=="object"&&this._cache.delete(P.schema),delete this.schemas[_],delete this.refs[_],this}case"object":{const P=_;this._cache.delete(P);let C=_[this.opts.schemaId];return C&&(C=(0,l.normalizeId)(C),delete this.schemas[C],delete this.refs[C]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(_){for(const P of _)this.addKeyword(P);return this}addKeyword(_,P){let C;if(typeof _=="string")C=_,typeof P=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),P.keyword=C);else if(typeof _=="object"&&P===void 0){if(P=_,C=P.keyword,Array.isArray(C)&&!C.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(L.call(this,C,P),!P)return(0,u.eachItem)(C,j=>K.call(this,j)),this;Q.call(this,P);const S={...P,type:(0,c.getJSONTypes)(P.type),schemaType:(0,c.getJSONTypes)(P.schemaType)};return(0,u.eachItem)(C,S.type.length===0?j=>K.call(this,j,S):j=>S.type.forEach(R=>K.call(this,j,S,R))),this}getKeyword(_){const P=this.RULES.all[_];return typeof P=="object"?P.definition:!!P}removeKeyword(_){const{RULES:P}=this;delete P.keywords[_],delete P.all[_];for(const C of P.rules){const S=C.rules.findIndex(j=>j.keyword===_);S>=0&&C.rules.splice(S,1)}return this}addFormat(_,P){return typeof P=="string"&&(P=new RegExp(P)),this.formats[_]=P,this}errorsText(_=this.errors,{separator:P=", ",dataVar:C="data"}={}){return!_||_.length===0?"No errors":_.map(S=>`${C}${S.instancePath} ${S.message}`).reduce((S,j)=>S+P+j)}$dataMetaSchema(_,P){const C=this.RULES.all;_=JSON.parse(JSON.stringify(_));for(const S of P){const j=S.split("/").slice(1);let R=_;for(const D of j)R=R[D];for(const D in C){const H=C[D];if(typeof H!="object")continue;const{$data:T}=H.definition,W=R[D];T&&W&&(R[D]=re(W))}}return _}_removeAllSchemas(_,P){for(const C in _){const S=_[C];(!P||P.test(C))&&(typeof S=="string"?delete _[C]:S&&!S.meta&&(this._cache.delete(S.schema),delete _[C]))}}_addSchema(_,P,C,S=this.opts.validateSchema,j=this.opts.addUsedSchema){let R;const{schemaId:D}=this.opts;if(typeof _=="object")R=_[D];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof _!="boolean")throw new Error("schema must be object or boolean")}let H=this._cache.get(_);if(H!==void 0)return H;C=(0,l.normalizeId)(R||C);const T=l.getSchemaRefs.call(this,_,C);return H=new a.SchemaEnv({schema:_,schemaId:D,meta:P,baseId:C,localRefs:T}),this._cache.set(H.schema,H),j&&!C.startsWith("#")&&(C&&this._checkUnique(C),this.refs[C]=H),S&&this.validateSchema(_,!0),H}_checkUnique(_){if(this.schemas[_]||this.refs[_])throw new Error(`schema with key or id "${_}" already exists`)}_compileSchemaEnv(_){if(_.meta?this._compileMetaSchema(_):a.compileSchema.call(this,_),!_.validate)throw new Error("ajv implementation error");return _.validate}_compileMetaSchema(_){const P=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,_)}finally{this.opts=P}}}O.ValidationError=n.default,O.MissingRefError=i.default,e.default=O;function p(E,_,P,C="error"){for(const S in E){const j=S;j in _&&this.logger[C](`${P}: option ${S}. ${E[j]}`)}}function x(E){return E=(0,l.normalizeId)(E),this.schemas[E]||this.refs[E]}function $(){const E=this.opts.schemas;if(E)if(Array.isArray(E))this.addSchema(E);else for(const _ in E)this.addSchema(E[_],_)}function k(){for(const E in this.opts.formats){const _=this.opts.formats[E];_&&this.addFormat(E,_)}}function N(E){if(Array.isArray(E)){this.addVocabulary(E);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const _ in E){const P=E[_];P.keyword||(P.keyword=_),this.addKeyword(P)}}function I(){const E={...this.opts};for(const _ of g)delete E[_];return E}const U={log(){},warn(){},error(){}};function q(E){if(E===!1)return U;if(E===void 0)return console;if(E.log&&E.warn&&E.error)return E;throw new Error("logger must implement log, warn and error methods")}const M=/^[a-z_$][a-z0-9_$:-]*$/i;function L(E,_){const{RULES:P}=this;if((0,u.eachItem)(E,C=>{if(P.keywords[C])throw new Error(`Keyword ${C} is already defined`);if(!M.test(C))throw new Error(`Keyword ${C} has invalid name`)}),!!_&&_.$data&&!("code"in _||"validate"in _))throw new Error('$data keyword must have "code" or "validate" function')}function K(E,_,P){var C;const S=_?.post;if(P&&S)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:j}=this;let R=S?j.post:j.rules.find(({type:H})=>H===P);if(R||(R={type:P,rules:[]},j.rules.push(R)),j.keywords[E]=!0,!_)return;const D={keyword:E,definition:{..._,type:(0,c.getJSONTypes)(_.type),schemaType:(0,c.getJSONTypes)(_.schemaType)}};_.before?B.call(this,R,D,_.before):R.rules.push(D),j.all[E]=D,(C=_.implements)===null||C===void 0||C.forEach(H=>this.addKeyword(H))}function B(E,_,P){const C=E.rules.findIndex(S=>S.keyword===P);C>=0?E.rules.splice(C,0,_):(E.rules.push(_),this.logger.warn(`rule ${P} is not defined`))}function Q(E){let{metaSchema:_}=E;_!==void 0&&(E.$data&&this.opts.$data&&(_=re(_)),E.validateSchema=this.compile(_,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function re(E){return{anyOf:[E,X]}}})(Fa)),Fa}var Ii={},Ri={},Di={},ou;function tb(){if(ou)return Di;ou=1,Object.defineProperty(Di,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Di.default=e,Di}var $r={},lu;function rb(){if(lu)return $r;lu=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.callRef=$r.getValidate=void 0;const e=Zs(),t=Xt(),r=je(),n=zr(),i=Ko(),s=Re(),a={keyword:"$ref",schemaType:"string",code(c){const{gen:u,schema:d,it:h}=c,{baseId:m,schemaEnv:g,validateName:b,opts:v,self:y}=h,{root:f}=g;if((d==="#"||d==="#/")&&m===f.baseId)return O();const A=i.resolveRef.call(y,f,m,d);if(A===void 0)throw new e.default(h.opts.uriResolver,m,d);if(A instanceof i.SchemaEnv)return p(A);return x(A);function O(){if(g===f)return l(c,b,g,g.$async);const $=u.scopeValue("root",{ref:f});return l(c,(0,r._)`${$}.validate`,f,f.$async)}function p($){const k=o(c,$);l(c,k,$,$.$async)}function x($){const k=u.scopeValue("schema",v.code.source===!0?{ref:$,code:(0,r.stringify)($)}:{ref:$}),N=u.name("valid"),I=c.subschema({schema:$,dataTypes:[],schemaPath:r.nil,topSchemaRef:k,errSchemaPath:d},N);c.mergeEvaluated(I),c.ok(N)}}};function o(c,u){const{gen:d}=c;return u.validate?d.scopeValue("validate",{ref:u.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:u})}.validate`}$r.getValidate=o;function l(c,u,d,h){const{gen:m,it:g}=c,{allErrors:b,schemaEnv:v,opts:y}=g,f=y.passContext?n.default.this:r.nil;h?A():O();function A(){if(!v.$async)throw new Error("async schema referenced by sync schema");const $=m.let("valid");m.try(()=>{m.code((0,r._)`await ${(0,t.callValidateCode)(c,u,f)}`),x(u),b||m.assign($,!0)},k=>{m.if((0,r._)`!(${k} instanceof ${g.ValidationError})`,()=>m.throw(k)),p(k),b||m.assign($,!1)}),c.ok($)}function O(){c.result((0,t.callValidateCode)(c,u,f),()=>x(u),()=>p(u))}function p($){const k=(0,r._)`${$}.errors`;m.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${k} : ${n.default.vErrors}.concat(${k})`),m.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function x($){var k;if(!g.opts.unevaluated)return;const N=(k=d?.validate)===null||k===void 0?void 0:k.evaluated;if(g.props!==!0)if(N&&!N.dynamicProps)N.props!==void 0&&(g.props=s.mergeEvaluated.props(m,N.props,g.props));else{const I=m.var("props",(0,r._)`${$}.evaluated.props`);g.props=s.mergeEvaluated.props(m,I,g.props,r.Name)}if(g.items!==!0)if(N&&!N.dynamicItems)N.items!==void 0&&(g.items=s.mergeEvaluated.items(m,N.items,g.items));else{const I=m.var("items",(0,r._)`${$}.evaluated.items`);g.items=s.mergeEvaluated.items(m,I,g.items,r.Name)}}}return $r.callRef=l,$r.default=a,$r}var cu;function nb(){if(cu)return Ri;cu=1,Object.defineProperty(Ri,"__esModule",{value:!0});const e=tb(),t=rb(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ri.default=r,Ri}var Ti={},Mi={},uu;function ib(){if(uu)return Mi;uu=1,Object.defineProperty(Mi,"__esModule",{value:!0});const e=je(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:a})=>(0,e.str)`must be ${r[s].okStr} ${a}`,params:({keyword:s,schemaCode:a})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:a,data:o,schemaCode:l}=s;s.fail$data((0,e._)`${o} ${r[a].fail} ${l} || isNaN(${o})`)}};return Mi.default=i,Mi}var Ui={},du;function sb(){if(du)return Ui;du=1,Object.defineProperty(Ui,"__esModule",{value:!0});const e=je(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:s,schemaCode:a,it:o}=n,l=o.opts.multipleOfPrecision,c=i.let("res"),u=l?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${l}`:(0,e._)`${c} !== parseInt(${c})`;n.fail$data((0,e._)`(${a} === 0 || (${c} = ${s}/${a}, ${u}))`)}};return Ui.default=r,Ui}var qi={},Li={},fu;function ab(){if(fu)return Li;fu=1,Object.defineProperty(Li,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,s;for(;i<r;)n++,s=t.charCodeAt(i++),s>=55296&&s<=56319&&i<r&&(s=t.charCodeAt(i),(s&64512)===56320&&i++);return n}return Li.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Li}var hu;function ob(){if(hu)return qi;hu=1,Object.defineProperty(qi,"__esModule",{value:!0});const e=je(),t=Re(),r=ab(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:a}){const o=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${a} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:a,data:o,schemaCode:l,it:c}=s,u=a==="maxLength"?e.operators.GT:e.operators.LT,d=c.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${o})`;s.fail$data((0,e._)`${d} ${u} ${l}`)}};return qi.default=i,qi}var Vi={},mu;function lb(){if(mu)return Vi;mu=1,Object.defineProperty(Vi,"__esModule",{value:!0});const e=Xt(),t=Re(),r=je(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,r.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,r._)`{pattern: ${s}}`},code(s){const{gen:a,data:o,$data:l,schema:c,schemaCode:u,it:d}=s,h=d.opts.unicodeRegExp?"u":"";if(l){const{regExp:m}=d.opts.code,g=m.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(a,m),b=a.let("valid");a.try(()=>a.assign(b,(0,r._)`${g}(${u}, ${h}).test(${o})`),()=>a.assign(b,!1)),s.fail$data((0,r._)`!${b}`)}else{const m=(0,e.usePattern)(s,c);s.fail$data((0,r._)`!${m}.test(${o})`)}}};return Vi.default=i,Vi}var zi={},pu;function cb(){if(pu)return zi;pu=1,Object.defineProperty(zi,"__esModule",{value:!0});const e=je(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:a}=n,o=i==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${o} ${a}`)}};return zi.default=r,zi}var Bi={},yu;function ub(){if(yu)return Bi;yu=1,Object.defineProperty(Bi,"__esModule",{value:!0});const e=Xt(),t=je(),r=Re(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:a,schema:o,schemaCode:l,data:c,$data:u,it:d}=s,{opts:h}=d;if(!u&&o.length===0)return;const m=o.length>=h.loopRequired;if(d.allErrors?g():b(),h.strictRequired){const f=s.parentSchema.properties,{definedProperties:A}=s.it;for(const O of o)if(f?.[O]===void 0&&!A.has(O)){const p=d.schemaEnv.baseId+d.errSchemaPath,x=`required property "${O}" is not defined at "${p}" (strictRequired)`;(0,r.checkStrictMode)(d,x,d.opts.strictRequired)}}function g(){if(m||u)s.block$data(t.nil,v);else for(const f of o)(0,e.checkReportMissingProp)(s,f)}function b(){const f=a.let("missing");if(m||u){const A=a.let("valid",!0);s.block$data(A,()=>y(f,A)),s.ok(A)}else a.if((0,e.checkMissingProp)(s,o,f)),(0,e.reportMissingProp)(s,f),a.else()}function v(){a.forOf("prop",l,f=>{s.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,c,f,h.ownProperties),()=>s.error())})}function y(f,A){s.setParams({missingProperty:f}),a.forOf(f,l,()=>{a.assign(A,(0,e.propertyInData)(a,c,f,h.ownProperties)),a.if((0,t.not)(A),()=>{s.error(),a.break()})},t.nil)}}};return Bi.default=i,Bi}var Ki={},gu;function db(){if(gu)return Ki;gu=1,Object.defineProperty(Ki,"__esModule",{value:!0});const e=je(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:a}=n,o=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${s}.length ${o} ${a}`)}};return Ki.default=r,Ki}var Hi={},Wi={},vu;function Ho(){if(vu)return Wi;vu=1,Object.defineProperty(Wi,"__esModule",{value:!0});const e=vf();return e.code='require("ajv/dist/runtime/equal").default',Wi.default=e,Wi}var bu;function fb(){if(bu)return Hi;bu=1,Object.defineProperty(Hi,"__esModule",{value:!0});const e=Ms(),t=je(),r=Re(),n=Ho(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:o}})=>(0,t.str)`must NOT have duplicate items (items ## ${o} and ${a} are identical)`,params:({params:{i:a,j:o}})=>(0,t._)`{i: ${a}, j: ${o}}`},code(a){const{gen:o,data:l,$data:c,schema:u,parentSchema:d,schemaCode:h,it:m}=a;if(!c&&!u)return;const g=o.let("valid"),b=d.items?(0,e.getSchemaTypes)(d.items):[];a.block$data(g,v,(0,t._)`${h} === false`),a.ok(g);function v(){const O=o.let("i",(0,t._)`${l}.length`),p=o.let("j");a.setParams({i:O,j:p}),o.assign(g,!0),o.if((0,t._)`${O} > 1`,()=>(y()?f:A)(O,p))}function y(){return b.length>0&&!b.some(O=>O==="object"||O==="array")}function f(O,p){const x=o.name("item"),$=(0,e.checkDataTypes)(b,x,m.opts.strictNumbers,e.DataType.Wrong),k=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${O}--;`,()=>{o.let(x,(0,t._)`${l}[${O}]`),o.if($,(0,t._)`continue`),b.length>1&&o.if((0,t._)`typeof ${x} == "string"`,(0,t._)`${x} += "_"`),o.if((0,t._)`typeof ${k}[${x}] == "number"`,()=>{o.assign(p,(0,t._)`${k}[${x}]`),a.error(),o.assign(g,!1).break()}).code((0,t._)`${k}[${x}] = ${O}`)})}function A(O,p){const x=(0,r.useFunc)(o,n.default),$=o.name("outer");o.label($).for((0,t._)`;${O}--;`,()=>o.for((0,t._)`${p} = ${O}; ${p}--;`,()=>o.if((0,t._)`${x}(${l}[${O}], ${l}[${p}])`,()=>{a.error(),o.assign(g,!1).break($)})))}}};return Hi.default=s,Hi}var Gi={},Su;function hb(){if(Su)return Gi;Su=1,Object.defineProperty(Gi,"__esModule",{value:!0});const e=je(),t=Re(),r=Ho(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:a,data:o,$data:l,schemaCode:c,schema:u}=s;l||u&&typeof u=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${o}, ${c})`):s.fail((0,e._)`${u} !== ${o}`)}};return Gi.default=i,Gi}var Ji={},xu;function mb(){if(xu)return Ji;xu=1,Object.defineProperty(Ji,"__esModule",{value:!0});const e=je(),t=Re(),r=Ho(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:a,data:o,$data:l,schema:c,schemaCode:u,it:d}=s;if(!l&&c.length===0)throw new Error("enum must have non-empty array");const h=c.length>=d.opts.loopEnum;let m;const g=()=>m??(m=(0,t.useFunc)(a,r.default));let b;if(h||l)b=a.let("valid"),s.block$data(b,v);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const f=a.const("vSchema",u);b=(0,e.or)(...c.map((A,O)=>y(f,O)))}s.pass(b);function v(){a.assign(b,!1),a.forOf("v",u,f=>a.if((0,e._)`${g()}(${o}, ${f})`,()=>a.assign(b,!0).break()))}function y(f,A){const O=c[A];return typeof O=="object"&&O!==null?(0,e._)`${g()}(${o}, ${f}[${A}])`:(0,e._)`${o} === ${O}`}}};return Ji.default=i,Ji}var Cu;function pb(){if(Cu)return Ti;Cu=1,Object.defineProperty(Ti,"__esModule",{value:!0});const e=ib(),t=sb(),r=ob(),n=lb(),i=cb(),s=ub(),a=db(),o=fb(),l=hb(),c=mb(),u=[e.default,t.default,r.default,n.default,i.default,s.default,a.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,c.default];return Ti.default=u,Ti}var Yi={},_n={},Au;function Sf(){if(Au)return _n;Au=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.validateAdditionalItems=void 0;const e=je(),t=Re(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:a,it:o}=s,{items:l}=a;if(!Array.isArray(l)){(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(s,l)}};function i(s,a){const{gen:o,schema:l,data:c,keyword:u,it:d}=s;d.items=!0;const h=o.const("len",(0,e._)`${c}.length`);if(l===!1)s.setParams({len:a.length}),s.pass((0,e._)`${h} <= ${a.length}`);else if(typeof l=="object"&&!(0,t.alwaysValidSchema)(d,l)){const g=o.var("valid",(0,e._)`${h} <= ${a.length}`);o.if((0,e.not)(g),()=>m(g)),s.ok(g)}function m(g){o.forRange("i",a.length,h,b=>{s.subschema({keyword:u,dataProp:b,dataPropType:t.Type.Num},g),d.allErrors||o.if((0,e.not)(g),()=>o.break())})}}return _n.validateAdditionalItems=i,_n.default=n,_n}var Zi={},En={},wu;function xf(){if(wu)return En;wu=1,Object.defineProperty(En,"__esModule",{value:!0}),En.validateTuple=void 0;const e=je(),t=Re(),r=Xt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:a,it:o}=s;if(Array.isArray(a))return i(s,"additionalItems",a);o.items=!0,!(0,t.alwaysValidSchema)(o,a)&&s.ok((0,r.validateArray)(s))}};function i(s,a,o=s.schema){const{gen:l,parentSchema:c,data:u,keyword:d,it:h}=s;b(c),h.opts.unevaluated&&o.length&&h.items!==!0&&(h.items=t.mergeEvaluated.items(l,o.length,h.items));const m=l.name("valid"),g=l.const("len",(0,e._)`${u}.length`);o.forEach((v,y)=>{(0,t.alwaysValidSchema)(h,v)||(l.if((0,e._)`${g} > ${y}`,()=>s.subschema({keyword:d,schemaProp:y,dataProp:y},m)),s.ok(m))});function b(v){const{opts:y,errSchemaPath:f}=h,A=o.length,O=A===v.minItems&&(A===v.maxItems||v[a]===!1);if(y.strictTuples&&!O){const p=`"${d}" is ${A}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(h,p,y.strictTuples)}}}return En.validateTuple=i,En.default=n,En}var $u;function yb(){if($u)return Zi;$u=1,Object.defineProperty(Zi,"__esModule",{value:!0});const e=xf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Zi.default=t,Zi}var Qi={},_u;function gb(){if(_u)return Qi;_u=1,Object.defineProperty(Qi,"__esModule",{value:!0});const e=je(),t=Re(),r=Xt(),n=Sf(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:o,parentSchema:l,it:c}=a,{prefixItems:u}=l;c.items=!0,!(0,t.alwaysValidSchema)(c,o)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return Qi.default=s,Qi}var Xi={},Eu;function vb(){if(Eu)return Xi;Eu=1,Object.defineProperty(Xi,"__esModule",{value:!0});const e=je(),t=Re(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:s}})=>s===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${s} valid item(s)`,params:({params:{min:i,max:s}})=>s===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${s}}`},code(i){const{gen:s,schema:a,parentSchema:o,data:l,it:c}=i;let u,d;const{minContains:h,maxContains:m}=o;c.opts.next?(u=h===void 0?1:h,d=m):u=1;const g=s.const("len",(0,e._)`${l}.length`);if(i.setParams({min:u,max:d}),d===void 0&&u===0){(0,t.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&u>d){(0,t.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(c,a)){let A=(0,e._)`${g} >= ${u}`;d!==void 0&&(A=(0,e._)`${A} && ${g} <= ${d}`),i.pass(A);return}c.items=!0;const b=s.name("valid");d===void 0&&u===1?y(b,()=>s.if(b,()=>s.break())):u===0?(s.let(b,!0),d!==void 0&&s.if((0,e._)`${l}.length > 0`,v)):(s.let(b,!1),v()),i.result(b,()=>i.reset());function v(){const A=s.name("_valid"),O=s.let("count",0);y(A,()=>s.if(A,()=>f(O)))}function y(A,O){s.forRange("i",0,g,p=>{i.subschema({keyword:"contains",dataProp:p,dataPropType:t.Type.Num,compositeRule:!0},A),O()})}function f(A){s.code((0,e._)`${A}++`),d===void 0?s.if((0,e._)`${A} >= ${u}`,()=>s.assign(b,!0).break()):(s.if((0,e._)`${A} > ${d}`,()=>s.assign(b,!1).break()),u===1?s.assign(b,!0):s.if((0,e._)`${A} >= ${u}`,()=>s.assign(b,!0)))}}};return Xi.default=n,Xi}var Va={},ju;function bb(){return ju||(ju=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=je(),r=Re(),n=Xt();e.error={message:({params:{property:l,depsCount:c,deps:u}})=>{const d=c===1?"property":"properties";return(0,t.str)`must have ${d} ${u} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:u,missingProperty:d}})=>(0,t._)`{property: ${l},
|
||
missingProperty: ${d},
|
||
depsCount: ${c},
|
||
deps: ${u}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,u]=s(l);a(l,c),o(l,u)}};function s({schema:l}){const c={},u={};for(const d in l){if(d==="__proto__")continue;const h=Array.isArray(l[d])?c:u;h[d]=l[d]}return[c,u]}function a(l,c=l.schema){const{gen:u,data:d,it:h}=l;if(Object.keys(c).length===0)return;const m=u.let("missing");for(const g in c){const b=c[g];if(b.length===0)continue;const v=(0,n.propertyInData)(u,d,g,h.opts.ownProperties);l.setParams({property:g,depsCount:b.length,deps:b.join(", ")}),h.allErrors?u.if(v,()=>{for(const y of b)(0,n.checkReportMissingProp)(l,y)}):(u.if((0,t._)`${v} && (${(0,n.checkMissingProp)(l,b,m)})`),(0,n.reportMissingProp)(l,m),u.else())}}e.validatePropertyDeps=a;function o(l,c=l.schema){const{gen:u,data:d,keyword:h,it:m}=l,g=u.name("valid");for(const b in c)(0,r.alwaysValidSchema)(m,c[b])||(u.if((0,n.propertyInData)(u,d,b,m.opts.ownProperties),()=>{const v=l.subschema({keyword:h,schemaProp:b},g);l.mergeValidEvaluated(v,g)},()=>u.var(g,!0)),l.ok(g))}e.validateSchemaDeps=o,e.default=i})(Va)),Va}var es={},Ou;function Sb(){if(Ou)return es;Ou=1,Object.defineProperty(es,"__esModule",{value:!0});const e=je(),t=Re(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:a,data:o,it:l}=i;if((0,t.alwaysValidSchema)(l,a))return;const c=s.name("valid");s.forIn("key",o,u=>{i.setParams({propertyName:u}),i.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},c),s.if((0,e.not)(c),()=>{i.error(!0),l.allErrors||s.break()})}),i.ok(c)}};return es.default=n,es}var ts={},ku;function Cf(){if(ku)return ts;ku=1,Object.defineProperty(ts,"__esModule",{value:!0});const e=Xt(),t=je(),r=zr(),n=Re(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:o,schema:l,parentSchema:c,data:u,errsCount:d,it:h}=a;if(!d)throw new Error("ajv implementation error");const{allErrors:m,opts:g}=h;if(h.props=!0,g.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,l))return;const b=(0,e.allSchemaProperties)(c.properties),v=(0,e.allSchemaProperties)(c.patternProperties);y(),a.ok((0,t._)`${d} === ${r.default.errors}`);function y(){o.forIn("key",u,x=>{!b.length&&!v.length?O(x):o.if(f(x),()=>O(x))})}function f(x){let $;if(b.length>8){const k=(0,n.schemaRefOrVal)(h,c.properties,"properties");$=(0,e.isOwnProperty)(o,k,x)}else b.length?$=(0,t.or)(...b.map(k=>(0,t._)`${x} === ${k}`)):$=t.nil;return v.length&&($=(0,t.or)($,...v.map(k=>(0,t._)`${(0,e.usePattern)(a,k)}.test(${x})`))),(0,t.not)($)}function A(x){o.code((0,t._)`delete ${u}[${x}]`)}function O(x){if(g.removeAdditional==="all"||g.removeAdditional&&l===!1){A(x);return}if(l===!1){a.setParams({additionalProperty:x}),a.error(),m||o.break();return}if(typeof l=="object"&&!(0,n.alwaysValidSchema)(h,l)){const $=o.name("valid");g.removeAdditional==="failing"?(p(x,$,!1),o.if((0,t.not)($),()=>{a.reset(),A(x)})):(p(x,$),m||o.if((0,t.not)($),()=>o.break()))}}function p(x,$,k){const N={keyword:"additionalProperties",dataProp:x,dataPropType:n.Type.Str};k===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(N,$)}}};return ts.default=s,ts}var rs={},Pu;function xb(){if(Pu)return rs;Pu=1,Object.defineProperty(rs,"__esModule",{value:!0});const e=Ys(),t=Xt(),r=Re(),n=Cf(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:a,schema:o,parentSchema:l,data:c,it:u}=s;u.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(o);for(const v of d)u.definedProperties.add(v);u.opts.unevaluated&&d.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(d),u.props));const h=d.filter(v=>!(0,r.alwaysValidSchema)(u,o[v]));if(h.length===0)return;const m=a.name("valid");for(const v of h)g(v)?b(v):(a.if((0,t.propertyInData)(a,c,v,u.opts.ownProperties)),b(v),u.allErrors||a.else().var(m,!0),a.endIf()),s.it.definedProperties.add(v),s.ok(m);function g(v){return u.opts.useDefaults&&!u.compositeRule&&o[v].default!==void 0}function b(v){s.subschema({keyword:"properties",schemaProp:v,dataProp:v},m)}}};return rs.default=i,rs}var ns={},Nu;function Cb(){if(Nu)return ns;Nu=1,Object.defineProperty(ns,"__esModule",{value:!0});const e=Xt(),t=je(),r=Re(),n=Re(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:a,schema:o,data:l,parentSchema:c,it:u}=s,{opts:d}=u,h=(0,e.allSchemaProperties)(o),m=h.filter(O=>(0,r.alwaysValidSchema)(u,o[O]));if(h.length===0||m.length===h.length&&(!u.opts.unevaluated||u.props===!0))return;const g=d.strictSchema&&!d.allowMatchingProperties&&c.properties,b=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:v}=u;y();function y(){for(const O of h)g&&f(O),u.allErrors?A(O):(a.var(b,!0),A(O),a.if(b))}function f(O){for(const p in g)new RegExp(O).test(p)&&(0,r.checkStrictMode)(u,`property ${p} matches pattern ${O} (use allowMatchingProperties)`)}function A(O){a.forIn("key",l,p=>{a.if((0,t._)`${(0,e.usePattern)(s,O)}.test(${p})`,()=>{const x=m.includes(O);x||s.subschema({keyword:"patternProperties",schemaProp:O,dataProp:p,dataPropType:n.Type.Str},b),u.opts.unevaluated&&v!==!0?a.assign((0,t._)`${v}[${p}]`,!0):!x&&!u.allErrors&&a.if((0,t.not)(b),()=>a.break())})})}}};return ns.default=i,ns}var is={},Fu;function Ab(){if(Fu)return is;Fu=1,Object.defineProperty(is,"__esModule",{value:!0});const e=Re(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:s}=r;if((0,e.alwaysValidSchema)(s,i)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return is.default=t,is}var ss={},Iu;function wb(){if(Iu)return ss;Iu=1,Object.defineProperty(ss,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Xt().validateUnion,error:{message:"must match a schema in anyOf"}};return ss.default=t,ss}var as={},Ru;function $b(){if(Ru)return as;Ru=1,Object.defineProperty(as,"__esModule",{value:!0});const e=je(),t=Re(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:a,parentSchema:o,it:l}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(l.opts.discriminator&&o.discriminator)return;const c=a,u=s.let("valid",!1),d=s.let("passing",null),h=s.name("_valid");i.setParams({passing:d}),s.block(m),i.result(u,()=>i.reset(),()=>i.error(!0));function m(){c.forEach((g,b)=>{let v;(0,t.alwaysValidSchema)(l,g)?s.var(h,!0):v=i.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},h),b>0&&s.if((0,e._)`${h} && ${u}`).assign(u,!1).assign(d,(0,e._)`[${d}, ${b}]`).else(),s.if(h,()=>{s.assign(u,!0),s.assign(d,b),v&&i.mergeEvaluated(v,e.Name)})})}}};return as.default=n,as}var os={},Du;function _b(){if(Du)return os;Du=1,Object.defineProperty(os,"__esModule",{value:!0});const e=Re(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:s}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((o,l)=>{if((0,e.alwaysValidSchema)(s,o))return;const c=r.subschema({keyword:"allOf",schemaProp:l},a);r.ok(a),r.mergeEvaluated(c)})}};return os.default=t,os}var ls={},Tu;function Eb(){if(Tu)return ls;Tu=1,Object.defineProperty(ls,"__esModule",{value:!0});const e=je(),t=Re(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:a,parentSchema:o,it:l}=s;o.then===void 0&&o.else===void 0&&(0,t.checkStrictMode)(l,'"if" without "then" and "else" is ignored');const c=i(l,"then"),u=i(l,"else");if(!c&&!u)return;const d=a.let("valid",!0),h=a.name("_valid");if(m(),s.reset(),c&&u){const b=a.let("ifClause");s.setParams({ifClause:b}),a.if(h,g("then",b),g("else",b))}else c?a.if(h,g("then")):a.if((0,e.not)(h),g("else"));s.pass(d,()=>s.error(!0));function m(){const b=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);s.mergeEvaluated(b)}function g(b,v){return()=>{const y=s.subschema({keyword:b},h);a.assign(d,h),s.mergeValidEvaluated(y,d),v?a.assign(v,(0,e._)`${b}`):s.setParams({ifClause:b})}}}};function i(s,a){const o=s.schema[a];return o!==void 0&&!(0,t.alwaysValidSchema)(s,o)}return ls.default=n,ls}var cs={},Mu;function jb(){if(Mu)return cs;Mu=1,Object.defineProperty(cs,"__esModule",{value:!0});const e=Re(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return cs.default=t,cs}var Uu;function Ob(){if(Uu)return Yi;Uu=1,Object.defineProperty(Yi,"__esModule",{value:!0});const e=Sf(),t=yb(),r=xf(),n=gb(),i=vb(),s=bb(),a=Sb(),o=Cf(),l=xb(),c=Cb(),u=Ab(),d=wb(),h=$b(),m=_b(),g=Eb(),b=jb();function v(y=!1){const f=[u.default,d.default,h.default,m.default,g.default,b.default,a.default,o.default,s.default,l.default,c.default];return y?f.push(t.default,n.default):f.push(e.default,r.default),f.push(i.default),f}return Yi.default=v,Yi}var us={},ds={},qu;function kb(){if(qu)return ds;qu=1,Object.defineProperty(ds,"__esModule",{value:!0});const e=je(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:s,data:a,$data:o,schema:l,schemaCode:c,it:u}=n,{opts:d,errSchemaPath:h,schemaEnv:m,self:g}=u;if(!d.validateFormats)return;o?b():v();function b(){const y=s.scopeValue("formats",{ref:g.formats,code:d.code.formats}),f=s.const("fDef",(0,e._)`${y}[${c}]`),A=s.let("fType"),O=s.let("format");s.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>s.assign(A,(0,e._)`${f}.type || "string"`).assign(O,(0,e._)`${f}.validate`),()=>s.assign(A,(0,e._)`"string"`).assign(O,f)),n.fail$data((0,e.or)(p(),x()));function p(){return d.strictSchema===!1?e.nil:(0,e._)`${c} && !${O}`}function x(){const $=m.$async?(0,e._)`(${f}.async ? await ${O}(${a}) : ${O}(${a}))`:(0,e._)`${O}(${a})`,k=(0,e._)`(typeof ${O} == "function" ? ${$} : ${O}.test(${a}))`;return(0,e._)`${O} && ${O} !== true && ${A} === ${i} && !${k}`}}function v(){const y=g.formats[l];if(!y){p();return}if(y===!0)return;const[f,A,O]=x(y);f===i&&n.pass($());function p(){if(d.strictSchema===!1){g.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${l}" ignored in schema at path "${h}"`}}function x(k){const N=k instanceof RegExp?(0,e.regexpCode)(k):d.code.formats?(0,e._)`${d.code.formats}${(0,e.getProperty)(l)}`:void 0,I=s.scopeValue("formats",{key:l,ref:k,code:N});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,e._)`${I}.validate`]:["string",k,I]}function $(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!m.$async)throw new Error("async format in sync schema");return(0,e._)`await ${O}(${a})`}return typeof A=="function"?(0,e._)`${O}(${a})`:(0,e._)`${O}.test(${a})`}}}};return ds.default=r,ds}var Lu;function Pb(){if(Lu)return us;Lu=1,Object.defineProperty(us,"__esModule",{value:!0});const t=[kb().default];return us.default=t,us}var en={},Vu;function Nb(){return Vu||(Vu=1,Object.defineProperty(en,"__esModule",{value:!0}),en.contentVocabulary=en.metadataVocabulary=void 0,en.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],en.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),en}var zu;function Fb(){if(zu)return Ii;zu=1,Object.defineProperty(Ii,"__esModule",{value:!0});const e=nb(),t=pb(),r=Ob(),n=Pb(),i=Nb(),s=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return Ii.default=s,Ii}var fs={},ri={},Bu;function Ib(){if(Bu)return ri;Bu=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(ri.DiscrError=e={})),ri}var Ku;function Rb(){if(Ku)return fs;Ku=1,Object.defineProperty(fs,"__esModule",{value:!0});const e=je(),t=Ib(),r=Ko(),n=Zs(),i=Re(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:l}})=>o===t.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf`,params:({params:{discrError:o,tag:l,tagName:c}})=>(0,e._)`{error: ${o}, tag: ${c}, tagValue: ${l}}`},code(o){const{gen:l,data:c,schema:u,parentSchema:d,it:h}=o,{oneOf:m}=d;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const g=u.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const b=l.let("valid",!1),v=l.const("tag",(0,e._)`${c}${(0,e.getProperty)(g)}`);l.if((0,e._)`typeof ${v} == "string"`,()=>y(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:v,tagName:g})),o.ok(b);function y(){const O=A();l.if(!1);for(const p in O)l.elseIf((0,e._)`${v} === ${p}`),l.assign(b,f(O[p]));l.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:v,tagName:g}),l.endIf()}function f(O){const p=l.name("valid"),x=o.subschema({keyword:"oneOf",schemaProp:O},p);return o.mergeEvaluated(x,e.Name),p}function A(){var O;const p={},x=k(d);let $=!0;for(let U=0;U<m.length;U++){let q=m[U];if(q?.$ref&&!(0,i.schemaHasRulesButRef)(q,h.self.RULES)){const L=q.$ref;if(q=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,L),q instanceof r.SchemaEnv&&(q=q.schema),q===void 0)throw new n.default(h.opts.uriResolver,h.baseId,L)}const M=(O=q?.properties)===null||O===void 0?void 0:O[g];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);$=$&&(x||k(q)),N(M,U)}if(!$)throw new Error(`discriminator: "${g}" must be required`);return p;function k({required:U}){return Array.isArray(U)&&U.includes(g)}function N(U,q){if(U.const)I(U.const,q);else if(U.enum)for(const M of U.enum)I(M,q);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function I(U,q){if(typeof U!="string"||U in p)throw new Error(`discriminator: "${g}" values must be unique strings`);p[U]=q}}}};return fs.default=a,fs}const Db="http://json-schema.org/draft-07/schema#",Tb="http://json-schema.org/draft-07/schema#",Mb="Core schema meta-schema",Ub={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},qb=["object","boolean"],Lb={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Vb={$schema:Db,$id:Tb,title:Mb,definitions:Ub,type:qb,properties:Lb,default:!0};var Hu;function Af(){return Hu||(Hu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=eb(),n=Fb(),i=Rb(),s=Vb,a=["/properties"],o="http://json-schema.org/draft-07/schema";class l extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(g=>this.addVocabulary(g)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const g=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(g,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=Ys();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=je();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=Bo();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var h=Zs();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(Oi,Oi.exports)),Oi.exports}var zb=Af();const Bb=mi(zb);var hs={exports:{}},za={},Wu;function Kb(){return Wu||(Wu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(N,I){return{validate:N,compare:I}}e.fullFormats={date:t(s,a),time:t(l,c),"date-time":t(d,h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:b,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:k,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y,int32:{type:"number",validate:O},int64:{type:"number",validate:p},float:{type:"number",validate:x},double:{type:"number",validate:x},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(N){return N%4===0&&(N%100!==0||N%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(N){const I=n.exec(N);if(!I)return!1;const U=+I[1],q=+I[2],M=+I[3];return q>=1&&q<=12&&M>=1&&M<=(q===2&&r(U)?29:i[q])}function a(N,I){if(N&&I)return N>I?1:N<I?-1:0}const o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(N,I){const U=o.exec(N);if(!U)return!1;const q=+U[1],M=+U[2],L=+U[3],K=U[5];return(q<=23&&M<=59&&L<=59||q===23&&M===59&&L===60)&&(!I||K!=="")}function c(N,I){if(!(N&&I))return;const U=o.exec(N),q=o.exec(I);if(U&&q)return N=U[1]+U[2]+U[3]+(U[4]||""),I=q[1]+q[2]+q[3]+(q[4]||""),N>I?1:N<I?-1:0}const u=/t|\s/i;function d(N){const I=N.split(u);return I.length===2&&s(I[0])&&l(I[1],!0)}function h(N,I){if(!(N&&I))return;const[U,q]=N.split(u),[M,L]=I.split(u),K=a(U,M);if(K!==void 0)return K||c(q,L)}const m=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function b(N){return m.test(N)&&g.test(N)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(N){return v.lastIndex=0,v.test(N)}const f=-2147483648,A=2**31-1;function O(N){return Number.isInteger(N)&&N<=A&&N>=f}function p(N){return Number.isInteger(N)}function x(){return!0}const $=/[^\\]\\Z/;function k(N){if($.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}})(za)),za}var Ba={},Gu;function Hb(){return Gu||(Gu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Af(),r=je(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:o,schemaCode:l})=>r.str`should be ${i[o].okStr} ${l}`,params:({keyword:o,schemaCode:l})=>r._`{comparison: ${i[o].okStr}, limit: ${l}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(o){const{gen:l,data:c,schemaCode:u,keyword:d,it:h}=o,{opts:m,self:g}=h;if(!m.validateFormats)return;const b=new t.KeywordCxt(h,g.RULES.all.format.definition,"format");b.$data?v():y();function v(){const A=l.scopeValue("formats",{ref:g.formats,code:m.code.formats}),O=l.const("fmt",r._`${A}[${b.schemaCode}]`);o.fail$data(r.or(r._`typeof ${O} != "object"`,r._`${O} instanceof RegExp`,r._`typeof ${O}.compare != "function"`,f(O)))}function y(){const A=b.schema,O=g.formats[A];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${d}": format "${A}" does not define "compare" function`);const p=l.scopeValue("formats",{key:A,ref:O,code:m.code.formats?r._`${m.code.formats}${r.getProperty(A)}`:void 0});o.fail$data(f(p))}function f(A){return r._`${A}.compare(${c}, ${u}) ${i[d].fail} 0`}},dependencies:["format"]};const a=o=>(o.addKeyword(e.formatLimitDefinition),o);e.default=a})(Ba)),Ba}var Ju;function Wb(){return Ju||(Ju=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Kb(),n=Hb(),i=je(),s=new i.Name("fullFormats"),a=new i.Name("fastFormats"),o=(c,u={keywords:!0})=>{if(Array.isArray(u))return l(c,u,r.fullFormats,s),c;const[d,h]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,s],m=u.formats||r.formatNames;return l(c,m,d,h),u.keywords&&n.default(c),c};o.get=(c,u="full")=>{const h=(u==="fast"?r.fastFormats:r.fullFormats)[c];if(!h)throw new Error(`Unknown format "${c}"`);return h};function l(c,u,d,h){var m,g;(m=(g=c.opts.code).formats)!==null&&m!==void 0||(g.formats=i._`require("ajv-formats/dist/formats").${h}`);for(const b of u)c.addFormat(b,d[b])}e.exports=t=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o})(hs,hs.exports)),hs.exports}var Gb=Wb();const Yu=mi(Gb),Jb={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Yb=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,Zb=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Qb(e,t,r={},n,i=Bb,s){let a=new i({...Jb,...r});return n?Yu(a,n):n!==!1&&Yu(a),a.addFormat("data-url",Zb),a.addFormat("color",Yb),a.addKeyword(Ao),Array.isArray(e)&&a.addMetaSchema(e),le(t)&&Object.keys(t).forEach(o=>{a.addFormat(o,t[o])}),s&&(a=s(a)),a}class Xb{ajv;localizer;suppressDuplicateFiltering;lastSeenRootSchema;hasRegisteredRootSchema=!1;constructor(t,r){const{additionalMetaSchemas:n,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:a,AjvClass:o,extenderFn:l,suppressDuplicateFiltering:c}=t;this.ajv=Qb(n,i,s,a,o,l),this.localizer=r,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}rawValidation(t,r){let n,i;try{t[Te]&&(i=this.ajv.getSchema(t[Te])),i===void 0&&(i=this.ajv.compile(t)),i(r)}catch(a){n=a,i===void 0&&this.ajv.removeSchema(t[Te]!==void 0?t[Te]:t)}let s;return i&&(typeof this.localizer=="function"&&((i.errors??[]).forEach(a=>{["missingProperty","property"].forEach(o=>{a.params?.[o]&&(a.params[o]=`'${a.params[o]}'`)}),a.params?.deps&&(a.params.deps=a.params.deps.split(", ").map(o=>`'${o}'`).join(", "))}),this.localizer(i.errors),(i.errors??[]).forEach(a=>{["missingProperty","property"].forEach(o=>{a.params?.[o]&&(a.params[o]=a.params[o].slice(1,-1))}),a.params?.deps&&(a.params.deps=a.params.deps.split(", ").map(o=>o.slice(1,-1)).join(", "))})),s=i.errors||void 0,i.errors=null),{errors:s,validationError:n}}validateFormData(t,r,n,i,s){const a=this.rawValidation(r,t);return Mv(this,a,t,r,n,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(t){if(this.lastSeenRootSchema===t&&this.hasRegisteredRootSchema)return;const r=t[Te]??ad;this.ajv.getSchema(r)===void 0?this.ajv.addSchema(t,r):Ae(t,this.ajv.getSchema(r)?.schema)||(this.ajv.removeSchema(r),this.ajv.addSchema(t,r)),this.lastSeenRootSchema=t,this.hasRegisteredRootSchema=!0}isValid(t,r,n){let i,s=!1;try{this.handleSchemaUpdate(n);const a=To(t);i=a[Te]??Wp(a);let o;return o=this.ajv.getSchema(i),o===void 0&&(o=this.ajv.addSchema(a,i).getSchema(i)||this.ajv.compile(a)),s=!0,o(r)}catch(a){return console.warn("Error encountered compiling schema:",a),!s&&i!==void 0&&this.ajv.removeSchema(i),!1}}}function e1(e={},t){return new Xb(e,t)}const t1=e1(),Zu=["#0ea5e9","#f97316","#22c55e","#a855f7","#ef4444","#eab308"],hi=G.createContext(0);function Wo(){const e=G.useContext(hi);return{color:Zu[e%Zu.length],depth:e}}function So(e,t=""){if(!e||typeof e!="object")return{};const r=Array.isArray(e.examples)?e.examples[0]:void 0,n=r===void 0?{}:{"ui:placeholder":String(r)};return e.writeOnly===!0?{"ui:widget":"SecretWidget","ui:options":{secretPath:t},...n}:e.type==="boolean"?{"ui:widget":"checkbox","ui:options":{label:!1}}:e.type==="array"&&e.items?{items:So(e.items,t?`${t}[]`:"[]")}:e.type!=="object"||!e.properties?n:Object.fromEntries(Object.entries(e.properties).map(([i,s])=>[i,So(s,t?`${t}.${i}`:i)]))}function r1({id:e,disabled:t,readonly:r,options:n,placeholder:i,registry:s}){const a=n.secretPath,o=s.formContext||{},l=o.secretOperations?.[a],c=!!o.configuredSecrets?.[a],u=l?.action==="replace",d=l?.action==="clear",h=t||r;function m(g){h||o.setSecretOperation?.(a,g)}return w.jsxs("div",{className:"configuration-secret space-y-0.5",children:[w.jsxs("div",{className:"flex flex-wrap items-center gap-0.5",children:[w.jsx("span",{className:"text-[0.7rem] text-slate-500",children:d?"Will be cleared when saved":u?"Replacement pending":c?"Configured":"Not configured"}),w.jsxs("div",{className:"flex gap-0.5",children:[w.jsx("button",{type:"button",className:"button-dark text-xs",disabled:h,onClick:()=>m(u?null:{action:"replace",value:""}),children:u?"Cancel replace":"Replace"}),w.jsx("button",{type:"button",className:d?"button-dark text-xs":"button-danger text-xs",disabled:h,onClick:()=>m(d?null:{action:"clear"}),children:d?"Undo clear":"Clear"})]})]}),u?w.jsx("input",{id:e,className:"field-input w-full",type:"password",autoComplete:"new-password",value:l.value,placeholder:i||"Enter replacement value",disabled:h,onChange:g=>m({action:"replace",value:g.target.value})}):null]})}function n1({children:e,classNames:t,description:r,errors:n,help:i,hidden:s,id:a,label:o,required:l,schema:c,style:u}){return s?w.jsx("div",{className:"hidden",children:e}):c?.type==="object"||c?.type==="array"?w.jsxs("div",{className:t,style:u,children:[e,n,i]}):w.jsxs("div",{className:`${t||""} configuration-line`,style:u,children:[w.jsx("div",{className:"configuration-key",children:w.jsxs("label",{htmlFor:a,className:"configuration-key-label",children:[o,l?w.jsx("span",{className:"ml-0.25 text-sky-300",children:"*"}):null]})}),w.jsxs("div",{className:"configuration-value",children:[r?w.jsx("div",{className:"configuration-value-description",children:r}):null,e,n,i]})]})}function i1({description:e,fieldPathId:t,properties:r,title:n}){const s=r.filter(l=>!l.hidden).map(l=>l.content),a=t.path.length===1,o=Wo();return t.path.length===0?w.jsxs("div",{children:[e?w.jsx("div",{className:"configuration-root-description",children:e}):null,w.jsx(hi.Provider,{value:0,children:w.jsx("div",{className:"configuration-tree",children:s})})]}):typeof t.path.at(-1)=="number"?w.jsxs("div",{children:[e?w.jsx("div",{className:"configuration-item-description",children:e}):null,s]}):w.jsxs(We,{title:n,color:o.color,clipOverflow:!1,stickyHeader:a,className:`configuration-card${a?" configuration-top-level-card":""}`,headerClassName:a?"configuration-card-header":"",bodyClassName:"configuration-card-body",children:[e?w.jsx("div",{className:"configuration-branch-description",children:e}):null,w.jsx(hi.Provider,{value:o.depth+1,children:w.jsx("div",{className:"configuration-children",children:s})})]})}function s1({buttonsProps:e,children:t,hasToolbar:r,index:n}){const i=e.disabled||e.readonly,s=Wo();return w.jsxs(We,{title:`Item ${n+1}`,color:s.color,clipOverflow:!1,className:"configuration-card configuration-array-item",bodyClassName:"configuration-card-body",children:[r?w.jsxs("div",{className:"configuration-item-actions",children:[e.hasMoveUp||e.hasMoveDown?w.jsx("button",{type:"button",className:"button-dark text-xs",disabled:i||!e.hasMoveUp,onClick:e.onMoveUpItem,children:"Move up"}):null,e.hasMoveUp||e.hasMoveDown?w.jsx("button",{type:"button",className:"button-dark text-xs",disabled:i||!e.hasMoveDown,onClick:e.onMoveDownItem,children:"Move down"}):null,e.hasCopy?w.jsx("button",{type:"button",className:"button-dark text-xs",disabled:i,onClick:e.onCopyItem,children:"Duplicate"}):null,e.hasRemove?w.jsx("button",{type:"button",className:"button-danger text-xs",disabled:i,onClick:e.onRemoveItem,children:"Remove"}):null]}):null,w.jsx(hi.Provider,{value:s.depth+1,children:w.jsx("div",{className:"configuration-children",children:t})})]})}function a1({canAdd:e,disabled:t,fieldPathId:r,items:n,onAddClick:i,readonly:s,schema:a,title:o}){const l=r.path.length===1,c=Wo();return w.jsxs(We,{title:o,meta:`${n.length} ${n.length===1?"item":"items"}`,color:c.color,clipOverflow:!1,stickyHeader:l,className:`configuration-card configuration-array${l?" configuration-top-level-card":""}`,headerClassName:l?"configuration-card-header":"",bodyClassName:"configuration-card-body",children:[a.description?w.jsx("div",{className:"configuration-branch-description",children:a.description}):null,e?w.jsx("div",{className:"configuration-array-actions",children:w.jsx("button",{type:"button",className:"button-dark text-xs",disabled:t||s,onClick:i,children:"Add item"})}):null,w.jsx(hi.Provider,{value:c.depth+1,children:w.jsx("div",{className:"configuration-children",children:n.length?n:w.jsx("p",{className:"text-xs text-slate-500",children:"No items configured."})})})]})}function o1({schema:e,value:t,onChange:r,configuredSecrets:n,secretOperations:i,setSecretOperation:s}){const a=G.useMemo(()=>So(e),[e]),o=G.useMemo(()=>({SecretWidget:r1}),[]),l=G.useMemo(()=>({ArrayFieldItemTemplate:s1,ArrayFieldTemplate:a1,FieldTemplate:n1,ObjectFieldTemplate:i1}),[]),c=G.useMemo(()=>({configuredSecrets:n,secretOperations:i,setSecretOperation:s}),[n,i,s]);return w.jsx("div",{className:"configuration-schema-form",children:w.jsx(Or,{schema:e,uiSchema:a,formData:t,validator:t1,widgets:o,templates:l,formContext:c,noHtml5Validate:!0,showErrorList:!1,onChange:({formData:u})=>r(u),children:w.jsx(w.Fragment,{})})})}function Ka(e){return JSON.parse(JSON.stringify(e))}function l1({snapshot:e,socket:t,runSensitive:r,onSnapshot:n,onReload:i}){const s=e?.configuration?.config,a=e?.configuration?.schema,o=e?.configuration?.revision,[l,c]=G.useState(()=>Ka(s)),[u,d]=G.useState({}),[h,m]=G.useState(!1),[g,b]=G.useState(!1),[v,y]=G.useState(null),[f,A]=G.useState(""),[O,p]=G.useState(""),[x,$]=G.useState([]),k=G.useRef(null),N=G.useRef(null);G.useEffect(()=>{c(Ka(s)),d({}),p(""),y(null),$([])},[o,s]),G.useEffect(()=>{const K=k.current,B=N.current;if(!K||!B)return;const Q=()=>{K.style.setProperty("--configuration-sticky-top",`${B.offsetHeight}px`)};Q();const X=typeof ResizeObserver=="function"?new ResizeObserver(Q):null;return X?.observe(B),window.addEventListener("resize",Q),()=>{X?.disconnect(),window.removeEventListener("resize",Q),K.style.removeProperty("--configuration-sticky-top")}},[s,a]);const I=G.useMemo(()=>JSON.stringify(l)!==JSON.stringify(s)||Object.keys(u).length>0,[l,u,s]),U=h||g;if(!s||!a)return w.jsx("p",{className:"surface p-1 text-sm text-red-200",children:"The configuration document is unavailable."});const q=(K,B)=>d(Q=>{const X={...Q};return B?X[K]=B:delete X[K],X});async function M(){m(!0),p(""),$([]);try{const K=await r(()=>yh(t,{value:l,expectedRevision:o,secretOperations:u}));n(K.snapshot)}catch(K){p(K.message),$(K.validationErrors||[])}finally{m(!1)}}async function L(){if(!(!v||!window.confirm("Replace the current configuration with this YAML file and apply it now? Any unsaved edits will be discarded. Administrator accounts in the file will be ignored."))){b(!0),p(""),A(""),$([]);try{const B=await v.text(),Q=await r(()=>gh(t,{fileName:v.name,yaml:B,expectedRevision:o}));n(Q.snapshot),A(Q.ignoredAdministratorCount>0?`Configuration imported and applied. ${Q.ignoredAdministratorCount} administrator entr${Q.ignoredAdministratorCount===1?"y was":"ies were"} ignored.`:"Configuration imported and applied.")}catch(B){p(B.message),$(B.validationErrors||[])}finally{b(!1)}}}return w.jsx("div",{ref:k,className:"configuration-editor",children:w.jsxs(We,{title:"Configuration",meta:`revision ${o}`,clipOverflow:!1,bodyClassName:"p-0.5",children:[w.jsxs("div",{ref:N,className:"configuration-toolbar sticky top-0 z-20 mb-0.5 space-y-0.5 border border-neutral-500/60 bg-neutral-900/95 p-0.5 backdrop-blur",children:[w.jsx("p",{className:"text-xs text-slate-400",children:"Saving applies the complete revision immediately and reloads each affected service."}),w.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[w.jsx("button",{type:"button",className:"button-dark",disabled:U,onClick:i,children:"Reload"}),w.jsx("button",{type:"button",className:"button-dark",disabled:!I||U,onClick:()=>{c(Ka(s)),d({})},children:"Reset"}),w.jsx("button",{type:"button",className:"button-dark",disabled:!I||U,onClick:M,children:h?"Applying…":"Save configuration"})]})]}),w.jsxs(We,{title:"Import legacy YAML",bodyClassName:"space-y-0.5 p-1 text-sm",clipOverflow:!1,children:[w.jsx("p",{className:"text-sm text-slate-300",children:"Replace this configuration from an explicitly selected legacy file. Unknown old settings and administrator accounts are ignored; current settings are validated and applied immediately."}),w.jsxs("div",{className:"flex max-w-3xl flex-col gap-0.5 md:flex-row",children:[w.jsx("input",{className:"field-input min-w-0 flex-1",type:"file",accept:".yaml,.yml,text/yaml",disabled:U,onChange:K=>y(K.target.files?.[0]||null)},o),w.jsx("button",{type:"button",className:"button-dark",disabled:U||!v,onClick:L,children:g?"Importing…":"Import selected YAML"})]})]}),e.configurationApplication?.services?.some(K=>K.status==="failed")?w.jsxs("div",{className:"mb-0.5 border border-amber-500/60 bg-amber-950/40 p-1 text-xs text-amber-100",children:[w.jsx("p",{className:"font-semibold",children:"Configuration was saved, but some services could not reload"}),w.jsx("ul",{className:"mt-0.5 list-disc space-y-0.25 pl-4",children:e.configurationApplication.services.filter(K=>K.status==="failed").map((K,B)=>w.jsxs("li",{children:[K.section,": ",K.error]},`${K.section}-${B}`))})]}):null,O?w.jsx("p",{className:"border border-red-500/60 bg-red-950/40 p-1 text-xs text-red-100",children:O}):null,f?w.jsx("p",{className:"border border-emerald-500/60 bg-emerald-950/40 p-1 text-sm text-emerald-100",children:f}):null,x.length?w.jsxs("div",{className:"border border-red-500/60 bg-red-950/40 p-1 text-xs text-red-100",children:[w.jsx("p",{className:"font-semibold",children:"Configuration could not be saved"}),w.jsx("ul",{className:"mt-0.5 list-disc space-y-0.25 pl-4",children:x.map((K,B)=>w.jsxs("li",{children:[K.path,": ",K.message]},`${K.path}-${B}`))})]}):null,w.jsx(o1,{schema:a,value:l,onChange:c,configuredSecrets:e.configuration.configuredSecrets,secretOperations:u,setSecretOperation:q})]})})}function c1({open:e,busy:t,error:r,onCancel:n,onConfirm:i}){const[s,a]=G.useState("");if(!e)return null;async function o(c){c.preventDefault(),await i(s),a("")}function l(){a(""),n()}return w.jsx("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/75 p-2",children:w.jsxs("form",{className:"w-full max-w-sm border border-neutral-500/70 bg-neutral-900 p-1 text-slate-100 shadow-2xl",onSubmit:o,children:[w.jsx("h2",{className:"text-base font-semibold",children:"Confirm password"}),w.jsx("p",{className:"mt-0.5 text-xs text-slate-400",children:"This sensitive action requires recent confirmation of your administrator password."}),w.jsx("input",{autoFocus:!0,autoComplete:"current-password",className:"field-input mt-1 w-full",type:"password",value:s,onChange:c=>a(c.target.value)}),r?w.jsx("p",{className:"mt-0.5 text-xs text-red-300",children:r}):null,w.jsxs("div",{className:"mt-1 flex justify-end gap-0.5",children:[w.jsx("button",{type:"button",className:"button-dark",disabled:t,onClick:l,children:"Cancel"}),w.jsx("button",{type:"submit",className:"button-dark",disabled:t||!s,children:t?"Confirming…":"Confirm"})]})]})})}const u1=[{key:"overview",label:"Overview"},{key:"fleet",label:"Fleet operations"},{key:"users",label:"Users and administrators",lockdownOnly:!0},{key:"configuration",label:"Configuration",lockdownOnly:!0},{key:"backup-restore",label:"Backup and restore",lockdownOnly:!0}];function h1(){Yf({identitySurface:"passive"});const e=Qu(),t=ll(M=>M.session?.role||"user"),r=ll(M=>M.connected),[n,i]=Zf(),s=n.get("section")||"overview",[a,o]=G.useState(null),[l,c]=G.useState(""),u=G.useRef(null),[d,h]=G.useState(!1),[m,g]=G.useState(!1),[b,v]=G.useState(""),{value:y}=Qf("page",{backgroundTheme:Xf}),f=eh(y?.backgroundTheme),A=t==="admin"||t==="lockdown",O=t==="lockdown",p=G.useCallback(async()=>{if(!O){o(null);return}c("");try{o(await vh(e))}catch(M){c(M.message)}},[O,e]);G.useEffect(()=>{p()},[p,r]);const x=G.useCallback(async M=>{try{return await M()}catch(L){if(L.code!=="PASSWORD_CONFIRMATION_REQUIRED")throw L;return new Promise((K,B)=>{u.current={operation:M,resolve:K,reject:B},v(""),h(!0)})}},[]);async function $(M){g(!0),v("");try{await bh(e,M);const L=u.current;if(u.current=null,h(!1),L)try{L.resolve(await L.operation())}catch(K){L.reject(K)}}catch(L){v(L.message)}finally{g(!1)}}function k(){const M=u.current;u.current=null,h(!1),M&&M.reject(new Error("Sensitive action cancelled."))}function N(M){i(M==="overview"?{}:{section:M})}const I=u1.filter(M=>!M.lockdownOnly||O),U=I.some(M=>M.key===s)?s:"overview";let q;return A?U==="fleet"?q=w.jsx(nh,{}):O?a?U==="users"?q=w.jsxs("div",{className:"space-y-0.5",children:[w.jsx(Vh,{administrators:a.administrators,socket:e,runSensitive:x,onSnapshot:o}),w.jsx(qh,{})]}):U==="configuration"?q=w.jsx(l1,{snapshot:a,socket:e,runSensitive:x,onSnapshot:o,onReload:p}):U==="backup-restore"?q=w.jsx(Kh,{socket:e,runSensitive:x}):q=w.jsx(zh,{snapshot:a,socket:e,runSensitive:x,onSnapshot:o}):q=w.jsx(We,{title:"Loading administration",bodyClassName:"p-1 text-sm text-slate-300",children:w.jsx("p",{children:l||"Loading configuration and audit state…"})}):q=w.jsx(We,{title:"Administrator access",bodyClassName:"p-1 text-sm text-slate-300",children:w.jsx("p",{children:"Routine fleet operations are available. Configuration, users, secrets, and system administration require a lockdown administrator."})}):q=w.jsx("div",{className:"mx-auto w-full max-w-md",children:w.jsx(rh,{})}),w.jsxs("div",{className:`${f} min-h-screen text-slate-100`,children:[w.jsx(th,{}),w.jsx(c1,{open:d,busy:m,error:b,onCancel:k,onConfirm:$}),w.jsxs("main",{className:"mx-auto min-h-screen w-full max-w-[100rem] p-1",children:[w.jsx(We,{title:"MultiRover administration",meta:r?t:"offline",bodyClassName:"p-0.5 text-xs text-slate-400",children:w.jsx("p",{children:a?`Active configuration revision ${a.configuration.revision}. The running application has applied revision ${a.appliedRevision}.`:"Central server administration and configuration."})}),A?w.jsxs(Xu,{currentTab:U,onTabChange:N,children:[w.jsx("nav",{"aria-label":"Administration sections",children:w.jsx(ed,{className:"my-0.5",children:I.map(M=>w.jsx(jn,{id:M.key,children:M.label},M.key))})}),w.jsx(td,{children:w.jsx("section",{className:"min-w-0",children:q})})]}):w.jsx("section",{className:"mt-0.5 min-w-0",children:q})]})]})}export{h1 as default};
|
||
//# sourceMappingURL=AdminApp-CIfEu47p.js.map
|