dispach 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/README.md +131 -31
  2. package/dist/App-b1yrwrcq.js +11 -0
  3. package/dist/{App-dxqm39zx.js.map → App-b1yrwrcq.js.map} +1 -1
  4. package/dist/{ConfigEditor-7v5nebvy.js → ConfigEditor-n8hdw6r7.js} +4 -4
  5. package/dist/{ConfigEditor-7v5nebvy.js.map → ConfigEditor-n8hdw6r7.js.map} +1 -1
  6. package/dist/{KeyProbe-vjhmdpx6.js → KeyProbe-9jjeze5r.js} +3 -3
  7. package/dist/{KeyProbe-vjhmdpx6.js.map → KeyProbe-9jjeze5r.js.map} +1 -1
  8. package/dist/{Picker-jxaesaxy.js → Picker-hfeh1g6m.js} +3 -3
  9. package/dist/{Picker-jxaesaxy.js.map → Picker-hfeh1g6m.js.map} +1 -1
  10. package/dist/{SessionPicker-z2t0p4b5.js → SessionPicker-zyqkg4dn.js} +3 -3
  11. package/dist/{SessionPicker-z2t0p4b5.js.map → SessionPicker-zyqkg4dn.js.map} +1 -1
  12. package/dist/{SkillBrowser-yyf2gy0q.js → SkillBrowser-3qdp8080.js} +3 -3
  13. package/dist/{SkillBrowser-yyf2gy0q.js.map → SkillBrowser-3qdp8080.js.map} +1 -1
  14. package/dist/WizardApp-vzpbydy3.js +5 -0
  15. package/dist/{WizardApp-12ndxgqv.js.map → WizardApp-vzpbydy3.js.map} +1 -1
  16. package/dist/client.js +10 -10
  17. package/dist/client.js.map +5 -5
  18. package/dist/{config-yz0nz51b.js → config-g7za9x13.js} +13 -13
  19. package/dist/{config-yz0nz51b.js.map → config-g7za9x13.js.map} +1 -1
  20. package/dist/credential-npr6z8c8.js +19 -0
  21. package/dist/{credential-wgt4gvcz.js.map → credential-npr6z8c8.js.map} +2 -2
  22. package/dist/index-02dn6m2j.js +7 -0
  23. package/dist/{index-h2yds678.js.map → index-02dn6m2j.js.map} +1 -1
  24. package/dist/index-0d93hyfc.js +6 -0
  25. package/dist/{index-rqbtm761.js.map → index-0d93hyfc.js.map} +1 -1
  26. package/dist/index-1c5113t4.js +66 -0
  27. package/dist/index-1c5113t4.js.map +12 -0
  28. package/dist/{index-3nwfz9jq.js → index-258d8bzg.js} +10 -10
  29. package/dist/{index-3nwfz9jq.js.map → index-258d8bzg.js.map} +1 -1
  30. package/dist/{index-9d011p3q.js → index-3g3ny01d.js} +4 -4
  31. package/dist/{index-9d011p3q.js.map → index-3g3ny01d.js.map} +1 -1
  32. package/dist/{index-8bmhd2hj.js → index-4cf6v9nb.js} +4 -4
  33. package/dist/{index-8bmhd2hj.js.map → index-4cf6v9nb.js.map} +1 -1
  34. package/dist/{index-bwckzbf8.js → index-4z7axw4r.js} +4 -4
  35. package/dist/{index-bwckzbf8.js.map → index-4z7axw4r.js.map} +1 -1
  36. package/dist/{index-xgqzk5cq.js → index-6p999cx4.js} +6 -6
  37. package/dist/{index-xgqzk5cq.js.map → index-6p999cx4.js.map} +1 -1
  38. package/dist/index-6q4wf8e3.js +6 -0
  39. package/dist/{index-jym27m75.js.map → index-6q4wf8e3.js.map} +1 -1
  40. package/dist/{index-cx3vz7sf.js → index-9r0wyj6w.js} +4 -4
  41. package/dist/{index-cx3vz7sf.js.map → index-9r0wyj6w.js.map} +1 -1
  42. package/dist/{index-j97vttdt.js → index-ammv5st7.js} +6 -6
  43. package/dist/{index-j97vttdt.js.map → index-ammv5st7.js.map} +1 -1
  44. package/dist/{index-qc2vrq9z.js → index-cqqb6gaq.js} +5 -5
  45. package/dist/{index-qc2vrq9z.js.map → index-cqqb6gaq.js.map} +1 -1
  46. package/dist/{index-jk0def33.js → index-d4x6yvqh.js} +4 -4
  47. package/dist/{index-jk0def33.js.map → index-d4x6yvqh.js.map} +1 -1
  48. package/dist/index-fecm8xe7.js +77 -0
  49. package/dist/index-fecm8xe7.js.map +12 -0
  50. package/dist/{index-e8n70sgj.js → index-fex44816.js} +4 -4
  51. package/dist/{index-e8n70sgj.js.map → index-fex44816.js.map} +1 -1
  52. package/dist/{index-gbnc99j8.js → index-ff514z3y.js} +9 -9
  53. package/dist/{index-gbnc99j8.js.map → index-ff514z3y.js.map} +1 -1
  54. package/dist/{index-t1xvacym.js → index-gme2egyq.js} +4 -4
  55. package/dist/{index-t1xvacym.js.map → index-gme2egyq.js.map} +1 -1
  56. package/dist/{index-mrtb5y08.js → index-gz9x25tz.js} +4 -4
  57. package/dist/{index-mrtb5y08.js.map → index-gz9x25tz.js.map} +1 -1
  58. package/dist/{index-9nsfs0vy.js → index-h9mw7b9d.js} +4 -4
  59. package/dist/{index-9nsfs0vy.js.map → index-h9mw7b9d.js.map} +1 -1
  60. package/dist/{index-6b7qvh1x.js → index-hwpvhaza.js} +4 -4
  61. package/dist/{index-6b7qvh1x.js.map → index-hwpvhaza.js.map} +1 -1
  62. package/dist/{index-6z0yr17z.js → index-j55s3ehk.js} +7 -7
  63. package/dist/{index-6z0yr17z.js.map → index-j55s3ehk.js.map} +1 -1
  64. package/dist/{index-mgdgx22q.js → index-j7gyr5nx.js} +6 -6
  65. package/dist/{index-mgdgx22q.js.map → index-j7gyr5nx.js.map} +1 -1
  66. package/dist/{index-7da4fqcr.js → index-mtn0g9vc.js} +5 -5
  67. package/dist/{index-7da4fqcr.js.map → index-mtn0g9vc.js.map} +1 -1
  68. package/dist/{index-rqzg861g.js → index-qdbq8crg.js} +4 -4
  69. package/dist/{index-rqzg861g.js.map → index-qdbq8crg.js.map} +1 -1
  70. package/dist/{index-xqyms08r.js → index-s9mbq7h6.js} +4 -4
  71. package/dist/{index-xqyms08r.js.map → index-s9mbq7h6.js.map} +1 -1
  72. package/dist/{index-9f9pp2ef.js → index-tf71ap9v.js} +4 -4
  73. package/dist/{index-9f9pp2ef.js.map → index-tf71ap9v.js.map} +1 -1
  74. package/dist/index-ttwyrdjs.js +427 -0
  75. package/dist/index-ttwyrdjs.js.map +11 -0
  76. package/dist/{index-2cvtz0fy.js → index-tv4yv7d2.js} +228 -228
  77. package/dist/{index-2cvtz0fy.js.map → index-tv4yv7d2.js.map} +9 -9
  78. package/dist/{index-fvhg0xyd.js → index-ty24n0jh.js} +79 -79
  79. package/dist/{index-fvhg0xyd.js.map → index-ty24n0jh.js.map} +1 -1
  80. package/dist/index-v8e92nfw.js +6 -0
  81. package/dist/{index-b8zwg8a3.js.map → index-v8e92nfw.js.map} +1 -1
  82. package/dist/index-vgc3y3rm.js +6 -0
  83. package/dist/{index-my5cjx00.js.map → index-vgc3y3rm.js.map} +1 -1
  84. package/dist/index-whaw4b18.js +6 -0
  85. package/dist/index-whaw4b18.js.map +10 -0
  86. package/dist/index.js +202 -198
  87. package/dist/index.js.map +6 -6
  88. package/dist/lib/bootstrap.d.ts +13 -0
  89. package/dist/lib/bootstrap.d.ts.map +1 -1
  90. package/dist/lib/commands.d.ts.map +1 -1
  91. package/dist/lib/init-flow.d.ts +17 -4
  92. package/dist/lib/init-flow.d.ts.map +1 -1
  93. package/dist/lib/provision.d.ts.map +1 -1
  94. package/dist/serve.d.ts.map +1 -1
  95. package/dist/{web-w7r68df1.js → web-vkb16r62.js} +5 -5
  96. package/dist/{web-w7r68df1.js.map → web-vkb16r62.js.map} +1 -1
  97. package/dist/wire.js +10 -10
  98. package/dist/wire.js.map +4 -4
  99. package/package.json +2 -2
  100. package/dist/App-dxqm39zx.js +0 -11
  101. package/dist/WizardApp-12ndxgqv.js +0 -5
  102. package/dist/credential-wgt4gvcz.js +0 -19
  103. package/dist/index-9pj1ws0p.js +0 -77
  104. package/dist/index-9pj1ws0p.js.map +0 -12
  105. package/dist/index-b5wwtxzk.js +0 -66
  106. package/dist/index-b5wwtxzk.js.map +0 -12
  107. package/dist/index-b8zwg8a3.js +0 -6
  108. package/dist/index-bry9bzt3.js +0 -427
  109. package/dist/index-bry9bzt3.js.map +0 -11
  110. package/dist/index-h2yds678.js +0 -7
  111. package/dist/index-jym27m75.js +0 -6
  112. package/dist/index-my5cjx00.js +0 -6
  113. package/dist/index-rqbtm761.js +0 -6
  114. package/dist/index-yr25dnf5.js +0 -6
  115. package/dist/index-yr25dnf5.js.map +0 -10
@@ -1,77 +0,0 @@
1
- #!/usr/bin/env node
2
- import{bt,ke,j,Bt,Ce,Ln,Dn,Fn,qr,Kt,Gr,Zr,Vr,dr,Yr,Pe,eo,to}from"./index-b5wwtxzk.js";import{ne,pr,mr,To,_o,r,a,k,h,i,Te,N,g,Nt}from"./index-2cvtz0fy.js";var Re=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(s){return t[s]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},u={nan:"NaN"};return(s)=>{switch(s.code){case"invalid_type":{let f=u[s.expected]??s.expected,m=To(s.input),x=u[m]??m;return`Invalid input: expected ${f}, received ${x}`}case"invalid_value":if(s.values.length===1)return`Invalid input: expected ${mr(s.values[0])}`;return`Invalid option: expected one of ${pr(s.values,"|")}`;case"too_big":{let f=s.inclusive?"<=":"<",m=e(s.origin);if(m)return`Too big: expected ${s.origin??"value"} to have ${f}${s.maximum.toString()} ${m.unit??"elements"}`;return`Too big: expected ${s.origin??"value"} to be ${f}${s.maximum.toString()}`}case"too_small":{let f=s.inclusive?">=":">",m=e(s.origin);if(m)return`Too small: expected ${s.origin} to have ${f}${s.minimum.toString()} ${m.unit}`;return`Too small: expected ${s.origin} to be ${f}${s.minimum.toString()}`}case"invalid_format":{let f=s;if(f.format==="starts_with")return`Invalid string: must start with "${f.prefix}"`;if(f.format==="ends_with")return`Invalid string: must end with "${f.suffix}"`;if(f.format==="includes")return`Invalid string: must include "${f.includes}"`;if(f.format==="regex")return`Invalid string: must match pattern ${f.pattern}`;return`Invalid ${n[f.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${pr(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":if(s.options&&Array.isArray(s.options)&&s.options.length>0)return`Invalid discriminator value. Expected ${s.options.map((m)=>`'${m}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function J(){return{localeError:Re()}}ne(J());function sr(t={}){let e=t.now??(()=>new Date),n=new Map;return{approver:(s)=>new Promise((f)=>{let m={pending:{approvalId:s.approvalId,agentId:s.agentId,slug:s.slug,callId:s.callId,match:s.match,mutating:s.mutating,reason:s.reason,requestedAt:e().toISOString()},settle:(x)=>{n.delete(s.approvalId),f(x)}};n.set(s.approvalId,m),s.signal.addEventListener("abort",()=>m.settle(!1),{once:!0})}),pending:(s)=>[...n.values()].map((f)=>f.pending).filter((f)=>f.agentId===s).sort((f,m)=>f.requestedAt.localeCompare(m.requestedAt)),resolve:(s,f)=>{let m=n.get(s);if(m===void 0)return!1;return m.settle(f),!0},get size(){return n.size}}}function S(t,e,n={}){return new Response(JSON.stringify({error:t}),{status:e,headers:{"content-type":"application/json; charset=utf-8",...n}})}function ue(){return S({code:"unauthorized",message:"Missing or invalid bearer token.",hint:"Send Authorization: Bearer <token>, where the token is either the value of the variable named by server.tokenEnv or an operator key from POST /v1/keys. A revoked key, an expired one and a wrong one answer the same way on purpose."},401)}function be(){return S({code:"claim_spent",message:"That claim has already been exchanged.",hint:"A claim is good for one key. Use the key it minted; if it is lost, restart with --claim to print a new one — a claim lives in the process rather than the database, so it never outlives the boot that printed it."},401)}function Le(t,e){return S({code:"capability_required",message:`This credential cannot ${e}.`,hint:`The key is scoped, and "${t}" is not among its capabilities. GET /v1/keys shows what each key may do; mint another with POST /v1/keys, or use the server token. An unscoped key has all four.`,field:"scope.can"},403)}function ce(t,e){if(t.length!==e.length)return!1;let n=0;for(let u=0;u<t.length;u+=1)n|=t.charCodeAt(u)^e.charCodeAt(u);return n===0}function De(t){let e=t.headers.get("authorization")??"";return e.startsWith("Bearer ")?e.slice(7):""}async function $e(t){let e=De(t.request);if(t.expected!==void 0&&ce(e,t.expected))return{kind:"token"};if(e!==""){let n=await t.keys.findLive(await Dn(e),new Date(t.at).toISOString());if(n!==void 0)return await t.keys.touch(n.keyId,new Date(t.at).toISOString()),{kind:"key",keyId:n.keyId,...n.scope===void 0?{}:{scope:n.scope}};if(t.claim!==void 0&&ce(e,t.claim.token)){if(t.request.method!=="POST"||t.pathname!=="/v1/keys")return ue();if(!t.claim.live())return be();return{kind:"claim"}}}return ue()}var we="dispach.bearer";function Me(t){let e=t.headers.get("sec-websocket-protocol");if(e===null)return;let n=e.split(",").map((s)=>s.trim()),u=n.indexOf(we);return u===-1?void 0:n[u+1]??""}function Ue(t,e){let n=new Headers(t.headers);return n.set("authorization",`Bearer ${e}`),new Request(t.url,{method:t.method,headers:n})}function D(t,e){return t.meta({...e})}function Z(t,e){return t.meta({description:e})}var Fe=i({id:D(r().trim().min(1),{code:"sender_invalid",hint:'Send { "from": { "id": "agent:ops-bot", "kind": "agent" } }, or omit it entirely for a turn the token-holder is sending itself.',description:"Stable identifier for the sender. Appears on the turn row and in events."}),kind:D(g(Pe,{error:(t)=>{let e=typeof t.input==="string"?t.input:void 0,n=e===void 0?void 0:bt(e,Pe);return`from.kind must be one of: ${Pe.join(", ")}.${n===void 0?"":` Did you mean "${n}"?`}`}}),{code:"sender_invalid",hint:'This field decides the trust boundary — "agent" fences the message and blocks mutating tools for the turn, "user" does not — so there is no default and an unknown value is refused rather than guessed at. A turn the token-holder is sending itself omits "from".',description:'The trust boundary. "agent" fences the text as data and blocks mutating tools for the whole turn.'}),name:D(r().optional(),{code:"sender_invalid",hint:"A display name, shown beside the sender id. Omit it rather than sending an empty string.",description:"Human-readable name for the sender."})}).meta({description:"Attribution for a turn somebody other than the token-holder is sending. Omit for your own."}),He=D(Te([Nt("none"),i({channel:r().min(1),to:r().min(1)})]),{code:"deliver_invalid",hint:'A bare channel id is not enough on an API turn: the request has no originating conversation, so there is no recipient to infer. Send { "channel": "tg", "to": "12345" }, or "none" to read the reply from the event stream.',description:'Where the reply goes. "none" leaves it on the event stream and in the store.'}),Se=i({text:D(r().trim().min(1),{code:"message_text_required",hint:'Send { "text": "..." }. An empty turn would be billed for a full prompt and produce nothing.',description:"What to say to the agent."}),sessionKey:Z(r().min(1).optional(),"Which conversation this belongs to. Defaults to `api:default`."),deliver:He.optional(),from:Fe.optional(),stream:Z(k().optional(),"Stream the turn's events inline as SSE rather than returning a handle."),chunks:Z(k().optional(),"Include per-token `model.chunk` frames. Off by default — the reader decides.")}),xe=i({granted:D(k(),{code:"approval_decision_required",hint:'Send { "granted": true } or { "granted": false }. There is no default: one direction would deny a call over a typo and the other would grant one, and neither is a decision anybody made.',description:"Whether the blocked tool call may proceed."})}),Be=i({agents:h(r().min(1)).optional().meta({code:"key_scope_agents_invalid",hint:'Send { "agents": ["milo"] } — a list of agent ids. Omit it for a key that reaches every agent. An id naming no agent on this server is reported rather than silently matching nothing.',description:"Agent ids this key may reach. Absent means all of them."}),sessions:r().min(1).optional().meta({code:"key_scope_sessions_invalid",hint:'Send { "sessions": "team_42:" } — a session-key prefix, with an optional trailing "*". A prefix rather than a list, because the conversations this key will cover do not exist yet when it is minted.',description:"Session-key prefix. Absent means every session."}),can:h(g(["read","chat","write","admin"])).optional().meta({code:"key_scope_can_invalid",hint:'Send { "can": ["chat", "read"] }. The four are read (every GET), chat (send a message, answer an approval, stop a turn), write (schedules, phase, clearing a session) and admin (keys, provisioning, start/stop/reload). Absent means all four; an empty array means none, and is honoured as written.',description:"Capabilities this key may exercise. Absent means all four."}),expiresIn:a().int().positive().optional().meta({code:"key_scope_expires_invalid",hint:'Send { "expiresIn": 3600 } — whole seconds from now, as a number. Relative rather than an absolute instant, because that would need the caller and this server to agree about the clock; the response reports the absolute expiresAt this server computed.',description:"Seconds until this key stops authenticating. Absent means never."})}),Ee=i({label:D(r(),{code:"key_label_required",hint:'Send { "label": "my browser" }. A label is required rather than defaulted because it is the only thing distinguishing two credentials in a listing, and "key 2" is a name nobody can act on when deciding which to revoke.',description:"How this credential is shown in a listing. Required; see `keyLabelProblem`."}),scope:Be.optional().meta({code:"key_scope_invalid",hint:'Send { "scope": { "agents": ["milo"], "can": ["chat"] } }, or omit it entirely for a key that reaches everything — which is what every key minted before scopes existed does.',description:"Opt-in narrowing. Absent is an unscoped key."})}),_e=i({phase:D(r().min(1),{code:"phase_invalid",hint:"Send the name of a phase this agent's manifest declares. `GET /v1/agents/:id` lists them.",description:"The phase to move this session into."})}),Ne=i({reason:D(r().optional(),{code:"agent_stop_invalid",hint:"A short note, recorded on the row and shown wherever the agent is reported as off.",description:"Why, for whoever reads the listing later."})}),ze=i({answers:D(N(r(),D(r(),{code:"provision_answer_invalid",hint:"Answers arrive as strings from the terminal and from here, and are validated per step. Send the value as a string — including a boolean-looking choice, whose values are named in GET /v1/provision.",description:"One answer. Always text, whatever the step's type looks like."})),{code:"provision_answers_required",hint:'Send { "answers": { "name": "milo", … } }. Every step you leave out takes its default, exactly as `init --yes` does with flags; GET /v1/provision lists them.',description:"A subset of the wizard's steps, as strings. `GET /v1/provision` lists every step with its prompt, default and choices."})});function K(t,e){let n=t.safeParse(e??{});if(n.success)return{ok:!0,value:n.data};let u=n.error.issues[0],s=(u?.path??[]).filter((x)=>typeof x==="string"),f=qe(t,s);return{ok:!1,error:{...{code:"request_body_invalid",message:s.length===0?u?.message??"The request body is invalid.":`${s.join(".")}: ${u?.message}`,hint:"The field above is the one to fix. GET /v1/openapi.json describes every body this server accepts, including the error code each field produces."},...f?.code===void 0?{}:{code:f.code},...f?.hint===void 0?{}:{hint:f.hint},...s.length===0?{}:{field:s.join(".")}}}}function qe(t,e){let n=t,u=de(t);for(let s of e){if(n=Ge(n,s),n===void 0)break;u=de(n)??u}return u}function de(t){let e=t?.meta();if(e?.code===void 0&&e?.hint===void 0)return;return e}function Ge(t,e){let n=ee(t),u=n?.shape;if(u?.[e]!==void 0)return ee(u[e]);let s=n?.def?.valueType;return s===void 0?void 0:ee(s)}function ee(t){let e=t;for(let n=0;n<8&&e!==void 0;n+=1){let u=e.def?.innerType;if(u===void 0)return e;e=u}return e}var Ke={"GET /v1/health":{summary:"Liveness, the version, and how many agents are hosted."},"GET /v1/ready":{summary:"Whether a turn can be served yet.",statuses:[{code:503,when:"still starting; channels may still be connecting"}]},"GET /v1/agents":{summary:"Every agent this server knows about, hosted or switched off."},"GET /v1/agents/:id":{summary:"One agent, with its dialect, window, counts and warnings."},"POST /v1/agents/:id/reload":{summary:"Re-read the manifest by replacing the agent with a new instance.",statuses:[{code:409,when:"a turn is running — it is not aborted to apply a change"},{code:400,when:"a team member, which has no manifest of its own"}]},"GET /v1/provision":{summary:"The questions creating an agent asks, and whether this server can answer them."},"POST /v1/agents":{summary:"Create an agent and adopt it into this host, live.",body:ze,statuses:[{code:201,when:"created; `adopted` is empty with an `error` if it is not running"},{code:403,when:"not a loopback bind"},{code:501,when:"this server has no provisioner"}]},"POST /v1/agents/:id/stop":{summary:"Switch an agent off durably and drop it from this host now.",body:Ne,statuses:[{code:409,when:"a turn is running"}]},"POST /v1/agents/:id/start":{summary:"Switch it back on and have this host adopt it.",statuses:[{code:501,when:"this server cannot look up manifests"}]},"POST /v1/agents/:id/messages":{summary:"Start a turn. Returns once accepted; the turn runs detached.",body:Se,statuses:[{code:202,when:"accepted"}]},"POST /v1/agents/:id/turns/:turnId/stop":{summary:"Cooperatively stop a turn this API started.",statuses:[{code:409,when:"no cancel handle — a channel or schedule started it"}]},"GET /v1/agents/:id/turns/:turnId/stream":{summary:"One turn's events as SSE, replayed from the start and then live.",query:[{name:"chunks",about:"Include per-token frames. Off by default."},{name:"types",about:"Narrow to these event types, comma-separated."}],statuses:[{code:200,when:"an event stream; see the event table in the wire spec"}]},"GET /v1/events":{summary:"Every event this process emits, as SSE. The firehose.",query:[{name:"agentId",about:"Narrow to one agent."},{name:"sessionKey",about:"Narrow to one conversation."},{name:"chunks",about:"Include per-token frames. Off by default."},{name:"types",about:"Narrow to these event types, comma-separated."}],statuses:[{code:200,when:"an event stream; see the event table in the wire spec"}]},"GET /v1/agents/:id/approvals":{summary:"Questions waiting on a person, oldest first."},"POST /v1/agents/:id/approvals/:approvalId":{summary:"Answer one blocked tool call.",body:xe},"POST /v1/keys":{summary:"Mint an operator key. The secret is returned once and never again.",body:Ee,statuses:[{code:201,when:"minted"}]},"GET /v1/keys":{summary:"Every key, live and revoked. Never a secret."},"DELETE /v1/keys/:keyId":{summary:"Revoke a key. A soft delete; the row survives."},"GET /v1/agents/:id/turns/:turnId":{summary:"One turn's stored row."},"GET /v1/agents/:id/sessions":{summary:"Conversations, most recently active first."},"GET /v1/agents/:id/sessions/:key":{summary:"One conversation's summary."},"GET /v1/agents/:id/sessions/:key/messages":{summary:"A page of a conversation's messages.",query:[{name:"limit",about:"How many to return."},{name:"before",about:"Page backwards from this message id."}]},"DELETE /v1/agents/:id/sessions/:key":{summary:"Drop a conversation's history, turns and derived index."},"POST /v1/agents/:id/sessions/:key/phase":{summary:"Move a session into a declared phase.",body:_e},"GET /v1/agents/:id/schedules":{summary:"Every schedule, from the store."},"POST /v1/agents/:id/schedules":{summary:"Create a schedule. Validated by the manifest's own schedule rules.",statuses:[{code:201,when:"created"}]},"GET /v1/agents/:id/schedules/:sid":{summary:"One schedule's row."},"PATCH /v1/agents/:id/schedules/:sid":{summary:"Replace a schedule the API created."},"DELETE /v1/agents/:id/schedules/:sid":{summary:"Delete a schedule the API created."},"POST /v1/agents/:id/schedules/:sid/run":{summary:"Fire a schedule now, out of band."},"GET /v1/agents/:id/tools":{summary:"The resolved catalogue, with trust and phases."},"GET /v1/agents/:id/skills":{summary:"What the skills index holds."},"GET /v1/agents/:id/context":{summary:"The prompt the next turn would be given, without running one.",query:[{name:"sessionKey",about:"Which conversation to assemble for."},{name:"input",about:"Pretend this is the next message."}]},"POST /v1/channels/:channelId/webhook/:agentId":{summary:"A channel provider's webhook. Open by design; the provider authenticates itself."},"GET /v1/openapi.json":{summary:"This document."},"GET /docs":{summary:"A browser reference over this document."}};function We(t){return t.startsWith("/v1/")||t==="/docs"}function Ve(t){let e={};for(let n of t.routes){if(!We(n.pattern))continue;let u=Ke[`${n.method} ${n.pattern}`];if(u===void 0)continue;let s=n.pattern.replace(/:([A-Za-z0-9_]+)/g,"{$1}"),f=[...n.pattern.matchAll(/:([A-Za-z0-9_]+)/g)].map((C)=>({name:C[1],in:"path",required:!0,schema:{type:"string"}})),m=(u.query??[]).map((C)=>({name:C.name,in:"query",required:!1,description:C.about,schema:{type:"string"}})),x={};for(let C of u.statuses??[])x[String(C.code)]={description:C.when};if(x["200"]===void 0&&x["201"]===void 0){if(x["202"]===void 0)x["200"]={description:"OK"}}if(x["401"]={description:"No credential, or one this server does not accept."},n.pattern.includes(":id"))x["404"]={description:"No such agent, or it is switched off."};e[s]??={};let A={summary:u.summary,...f.length+m.length===0?{}:{parameters:[...f,...m]},responses:x};if(u.body!==void 0)A.requestBody={required:!0,content:{"application/json":{schema:_o(u.body,{target:"draft-2020-12",io:"input"})}}};e[s][n.method.toLowerCase()]=A}return{openapi:"3.1.0",info:{title:"Dispach agent server",version:Bt,description:"Generated from the router table and the request schemas — see openapi.ts. The binding contract is docs/04-SPEC-WIRE.md, which is checked against the code; @dispach/client's types are the response reference."},...t.serverUrl===void 0?{}:{servers:[{url:t.serverUrl}]},components:{securitySchemes:{bearer:{type:"http",scheme:"bearer",description:"An operator key or the configured token."}},schemas:{Error:{type:"object",description:"Every failure has this shape. `hint` is never absent — it is the part that says what to do.",properties:{error:{type:"object",required:["code","message","hint"],properties:{code:{type:"string"},message:{type:"string"},hint:{type:"string"},field:{type:"string"}}}}}}},security:[{bearer:[]}],paths:e}}var Qe=new Set(["127.0.0.1","::1","localhost","[::1]"]);function Y(t){return Qe.has(t.toLowerCase())}function W(t){let e=t.trim();if(e===""||e.toLowerCase()==="null")return;try{return new URL(e.includes("://")?e:`http://${e}`).hostname.toLowerCase().replace(/^\[|\]$/g,"")}catch{return}}function fe(t){return Y(t)||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(t)}function ie(t,e){let n=Y(e.host),u=t.headers.get("host"),s=t.headers.get("origin");if(n){let m=u===null?void 0:W(u),x=e.allowedHosts??[];if(!(m!==void 0&&(fe(m)||x.some((C)=>W(C)===m))))return{code:"host_not_allowed",message:`This server does not answer to the host ${u??"(absent)"}.`,hint:"It is bound to loopback, so only a loopback name or address can legitimately reach it — a request addressed to any other name arrived through DNS pointed at this machine, which is how a web page reaches a local server it was never given access to. Add the name to server.allowedHosts if a proxy on this machine needs it.",field:"server.allowedHosts"}}if(s===null)return;let f=W(s);if(f!==void 0){if(fe(f))return;if((e.allowedOrigins??[]).some((m)=>W(m)===f))return;if(!n&&u!==null&&W(u)===f)return}return{code:"origin_not_allowed",message:`Refusing a request from the origin ${s}.`,hint:n?"This server is bound to loopback, so a page served from anywhere else has no business calling it. Add the origin to server.allowedOrigins if you meant to allow it.":"Only a page served from this server's own host may call it. Add the origin to server.allowedOrigins if you meant to allow it — there is no wildcard, deliberately.",field:"server.allowedOrigins"}}function Ye(t,e){let n=t.headers.get("origin");if(n===null)return{};if(ie(t,e)!==void 0)return{};return{"access-control-allow-origin":n,vary:"Origin"}}function Xe(t,e){let n=t.headers.get("access-control-request-headers");return{"access-control-allow-methods":e.join(", "),"access-control-allow-headers":n??"authorization, content-type","access-control-max-age":"600"}}function Je(t,e){if(t.kind!=="key")return t.kind!=="claim";let n=t.scope?.can;return n===void 0||n.includes(e)}function q(t,e){if(t.kind!=="key")return t.kind!=="claim";let n=t.scope?.agents;return n===void 0||n.includes(e)}function X(t,e){if(t.kind!=="key")return t.kind!=="claim";let n=t.scope?.sessions;if(n===void 0)return!0;return e.startsWith(n.endsWith("*")?n.slice(0,-1):n)}function je(t){if(t.kind!=="key")return!1;let e=t.scope;return e!==void 0&&(e.agents!==void 0||e.sessions!==void 0||e.can!==void 0)}class Oe{#e=[];add(t,e,n,u){return this.#e.push({method:t.toUpperCase(),pattern:e,handler:n,capability:u.capability,streaming:u.streaming===!0,segments:pe(e)}),this}routes(){return this.#e.map(({method:t,pattern:e,handler:n,streaming:u,capability:s})=>({method:t,pattern:e,handler:n,streaming:u,capability:s}))}match(t,e){let n=pe(e),u=[];for(let s of this.#e){let f=Ze(s.segments,n);if(f===void 0)continue;if(u.push(s),s.method===t.toUpperCase())return{kind:"found",handler:s.handler,params:f,streaming:s.streaming,capability:s.capability}}if(u.length>0)return{kind:"method",allowed:[...new Set(u.map((s)=>s.method))]};return{kind:"none"}}}function pe(t){return t.split("/").filter((e)=>e!=="")}function Ze(t,e){if(t.length!==e.length)return;let n={};for(let[u,s]of t.entries()){let f=e[u];if(f===void 0)return;if(s.startsWith(":")){try{n[s.slice(1)]=decodeURIComponent(f)}catch{return}continue}if(s!==f)return}return n}var Ae=15000;function et(t){let e=[];if(t.event!==void 0)e.push(`event: ${t.event}`);if(t.id!==void 0)e.push(`id: ${t.id}`);let n=typeof t.data==="string"?t.data:JSON.stringify(t.data);for(let u of n.split(`
3
- `))e.push(`data: ${u}`);return`${e.join(`
4
- `)}
5
-
6
- `}function oe(t){let e=new TextEncoder,n,u,s=!1,f=new ReadableStream({start(m){let x=()=>{if(s)return;if(s=!0,u!==void 0)clearInterval(u);n?.(),n=void 0;try{m.close()}catch{}},A=(y)=>{if(s)return;try{m.enqueue(e.encode(et(y)))}catch{x()}};t.signal?.addEventListener("abort",x,{once:!0});let C=t.start({send:A,close:x});if(s){C?.();return}n=C,u=setInterval(()=>{if(s)return;try{m.enqueue(e.encode(`: ping
7
-
8
- `))}catch{x()}},t.heartbeatMs??Ae),u.unref?.()},cancel(){if(s)return;if(s=!0,u!==void 0)clearInterval(u);n?.(),n=void 0}});return new Response(f,{status:t.status??200,headers:{"content-type":"text/event-stream; charset=utf-8","cache-control":"no-cache, no-transform",connection:"keep-alive","x-accel-buffering":"no"}})}var tt=':root{--ground: #0b0b0c;--raised: #151517;--line: #26262a;--text: #e8e6e3;--dim: #8b8b93;--accent: #7aa2f7;--warn: #e0af68;--bad: #f7768e;--ok: #9ece6a;--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--ground);color:var(--text);font:14px / 1.55 var(--sans);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;background:var(--raised);border:1px solid var(--line);border-radius:6px;padding:5px 11px;cursor:pointer}button:hover:not(:disabled){border-color:var(--dim)}button:disabled{opacity:.45;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:#0b0b0c;font-weight:600}button.bad{color:var(--bad)}input,textarea{font:inherit;color:inherit;background:var(--ground);border:1px solid var(--line);border-radius:6px;padding:8px 10px;width:100%}input:focus,textarea:focus{outline:none;border-color:var(--accent)}.shell{display:grid;grid-template-columns:240px 1fr;height:100vh}.side{background:var(--raised);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.side header{padding:14px 16px;border-bottom:1px solid var(--line)}.brand{font-weight:650;letter-spacing:.01em}.side nav{padding:8px;overflow-y:auto;flex:1;min-height:0}.side footer{padding:10px 12px;border-top:1px solid var(--line);display:flex;gap:8px;align-items:center}.row-button{display:block;width:100%;text-align:left;background:none;border:none;border-radius:6px;padding:7px 9px;font-family:var(--mono);font-size:12px}.row-button:hover{background:var(--ground)}.row-button[aria-current=true]{background:var(--ground);color:var(--accent)}.group{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--dim);padding:12px 9px 5px}.main{display:flex;flex-direction:column;min-height:0}.bar{display:flex;gap:14px;align-items:baseline;padding:12px 20px;border-bottom:1px solid var(--line);font-size:12px;color:var(--dim);min-height:44px}.bar strong{color:var(--text);font-size:14px;font-weight:600}.bar .spacer{flex:1}.scroll{flex:1;overflow-y:auto;min-height:0;padding:20px}.pad{max-width:780px;margin:0 auto}.row{margin:0 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}.row.user{background:var(--raised);border:1px solid var(--line);border-radius:8px;padding:10px 13px}.label{font-family:var(--mono);font-size:11px;color:var(--dim);margin-bottom:4px}.tool{border-left:2px solid var(--line);padding-left:11px;font-family:var(--mono);font-size:12px}.tool .slug{color:var(--accent)}.tool .out{color:var(--dim);max-height:13em;overflow-y:auto;margin-top:5px}.tool.failed .slug{color:var(--bad)}.tool .mut{color:var(--warn);font-size:11px}.tool .out{display:inline}.fence{border:1px dashed var(--warn);border-radius:6px;padding:7px 9px;margin-top:5px}.fence .why{color:var(--warn);font-size:11px;margin-bottom:4px}.note{font-size:12px;color:var(--dim);border-left:2px solid var(--line);padding-left:11px}.note.bad{color:var(--bad);border-left-color:var(--bad)}.ask{border:1px solid var(--warn);border-radius:8px;padding:12px 14px;background:#17140e}.ask .what{font-family:var(--mono);font-size:12px;margin:6px 0 10px;white-space:pre-wrap;overflow-wrap:anywhere}.ask .buttons{display:flex;gap:8px}.ask .settled{font-size:12px;color:var(--dim)}details.fold summary{cursor:pointer;color:var(--dim);font-family:var(--mono);font-size:11px}details.fold[open] summary{margin-bottom:5px}details.fold .body{color:var(--dim);font-size:13px}.composer{border-top:1px solid var(--line);padding:12px 20px}.composer .inner{max-width:780px;margin:0 auto;display:flex;gap:9px;align-items:flex-end}.composer textarea{resize:none;min-height:40px;max-height:190px;font-family:var(--sans)}.hint{font-size:11px;color:var(--dim);max-width:780px;margin:6px auto 0}.card{border:1px solid var(--line);border-radius:8px;padding:16px 18px;margin-bottom:14px;background:var(--raised)}.card h2{margin:0 0 4px;font-size:15px}.card p{margin:0 0 12px;color:var(--dim);font-size:13px}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--dim);font-weight:500;padding:0 10px 7px 0}td{padding:8px 10px 8px 0;border-top:1px solid var(--line);font-family:var(--mono);font-size:12px}td.revoked{color:var(--dim);text-decoration:line-through}.secret{font-family:var(--mono);font-size:12px;background:var(--ground);border:1px solid var(--ok);border-radius:6px;padding:9px 11px;overflow-wrap:anywhere;margin-bottom:8px}.gate{display:grid;place-items:center;height:100vh;padding:20px}.gate .card{max-width:460px;width:100%}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:var(--dim)}.dot.live{background:var(--ok)}.dot.busy{background:var(--warn)}@media(max-width:720px){.shell{grid-template-columns:1fr}.side{display:none}}.agent-row{display:block}.agent-row .row-button:disabled{color:var(--dim);cursor:default}.agent-off{color:var(--warn);font-size:11px}.agent-note{display:flex;gap:6px;align-items:baseline;padding:0 9px 6px;font-size:11px;color:var(--dim)}.link{background:none;border:none;padding:0;color:var(--accent);font-size:11px;text-decoration:underline;cursor:pointer}.link:disabled{color:var(--dim);cursor:default;text-decoration:none}.empty{color:var(--dim);font-size:13px;max-width:60ch}.panel-table{width:100%;border-collapse:collapse;font-size:12px}.panel-table th{text-align:left;font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--dim);padding:6px 10px 6px 0;border-bottom:1px solid var(--line)}.panel-table td{padding:9px 10px 9px 0;border-bottom:1px solid var(--line);vertical-align:top}.panel-table tr.off td{color:var(--dim)}.sub{color:var(--dim);font-size:11px;margin-top:2px;max-width:52ch}.channel{border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin-bottom:12px}.channel h3{margin:0 0 6px;font-size:13px;font-weight:500}.status{margin:0;font-size:12px}.status-connected{color:var(--ok)}.status-error,.status-disconnected{color:var(--bad)}.status-needs_input{color:var(--warn)}.channel-input{margin-top:10px;padding:10px;border-radius:6px;background:var(--ground)}.payload{margin:0;font-family:var(--mono);font-size:11px;white-space:pre-wrap;word-break:break-all;max-height:9em;overflow-y:auto}.channel-input.stale .payload{opacity:.45}.warn{color:var(--warn);font-size:12px;margin:0 0 6px}select{font:inherit;color:inherit;background:var(--ground);border:1px solid var(--line);border-radius:6px;padding:8px 10px;width:100%}select:focus{outline:none;border-color:var(--accent)}.provision{display:flex;flex-direction:column;gap:16px;max-width:60ch}.provision>button[type=submit]{align-self:flex-start}.field label{display:block;font-size:12px;color:var(--dim);margin-bottom:5px}.field.invalid input,.field.invalid select{border-color:var(--bad)}.sub{color:var(--dim);font-size:11px}.error{color:var(--bad);font-size:13px;max-width:60ch}.ok{color:var(--ok);font-size:13px}.created{max-width:66ch;font-size:13px}.created h3{font-size:15px;font-weight:600;margin:0 0 10px}.created p{margin:0 0 10px}.blank-secrets{border:1px solid var(--warn);border-radius:6px;padding:11px 13px;margin:14px 0}.blank-secrets p{margin:0 0 6px}.blank-secrets p:last-child{margin:0}\n',nt=`(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))o(x);new MutationObserver(x=>{for(const j of x)if(j.type==="childList")for(const D of j.addedNodes)D.tagName==="LINK"&&D.rel==="modulepreload"&&o(D)}).observe(document,{childList:!0,subtree:!0});function h(x){const j={};return x.integrity&&(j.integrity=x.integrity),x.referrerPolicy&&(j.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?j.credentials="include":x.crossOrigin==="anonymous"?j.credentials="omit":j.credentials="same-origin",j}function o(x){if(x.ep)return;x.ep=!0;const j=h(x);fetch(x.href,j)}})();var vf={exports:{}},On={};var Cr;function Ov(){if(Cr)return On;Cr=1;var c=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(o,x,j){var D=null;if(j!==void 0&&(D=""+j),x.key!==void 0&&(D=""+x.key),"key"in x){j={};for(var V in x)V!=="key"&&(j[V]=x[V])}else j=x;return x=j.ref,{$$typeof:c,type:o,key:D,ref:x!==void 0?x:null,props:j}}return On.Fragment=s,On.jsx=h,On.jsxs=h,On}var Rr;function Nv(){return Rr||(Rr=1,vf.exports=Ov()),vf.exports}var d=Nv(),mf={exports:{}},$={};var Hr;function Mv(){if(Hr)return $;Hr=1;var c=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),D=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),M=Symbol.iterator;function k(v){return v===null||typeof v!="object"?null:(v=M&&v[M]||v["@@iterator"],typeof v=="function"?v:null)}var ct={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,Tt={};function W(v,N,H){this.props=v,this.context=N,this.refs=Tt,this.updater=H||ct}W.prototype.isReactComponent={},W.prototype.setState=function(v,N){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,N,"setState")},W.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function It(){}It.prototype=W.prototype;function Ot(v,N,H){this.props=v,this.context=N,this.refs=Tt,this.updater=H||ct}var Nt=Ot.prototype=new It;Nt.constructor=Ot,C(Nt,W.prototype),Nt.isPureReactComponent=!0;var fe=Array.isArray;function Yt(){}var F={H:null,A:null,T:null,S:null},vt=Object.prototype.hasOwnProperty;function Pt(v,N,H){var G=H.ref;return{$$typeof:c,type:v,key:N,ref:G!==void 0?G:null,props:H}}function St(v,N){return Pt(v.type,N,v.props)}function Wt(v){return typeof v=="object"&&v!==null&&v.$$typeof===c}function wt(v){var N={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(H){return N[H]})}var we=/\\/+/g;function Me(v,N){return typeof v=="object"&&v!==null&&v.key!=null?wt(""+v.key):N.toString(36)}function te(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(Yt,Yt):(v.status="pending",v.then(function(N){v.status==="pending"&&(v.status="fulfilled",v.value=N)},function(N){v.status==="pending"&&(v.status="rejected",v.reason=N)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function z(v,N,H,G,J){var tt=typeof v;(tt==="undefined"||tt==="boolean")&&(v=null);var it=!1;if(v===null)it=!0;else switch(tt){case"bigint":case"string":case"number":it=!0;break;case"object":switch(v.$$typeof){case c:case s:it=!0;break;case U:return it=v._init,z(it(v._payload),N,H,G,J)}}if(it)return J=J(v),it=G===""?"."+Me(v,0):G,fe(J)?(H="",it!=null&&(H=it.replace(we,"$&/")+"/"),z(J,N,H,"",function(Ul){return Ul})):J!=null&&(Wt(J)&&(J=St(J,H+(J.key==null||v&&v.key===J.key?"":(""+J.key).replace(we,"$&/")+"/")+it)),N.push(J)),1;it=0;var Zt=G===""?".":G+":";if(fe(v))for(var Et=0;Et<v.length;Et++)G=v[Et],tt=Zt+Me(G,Et),it+=z(G,N,H,tt,J);else if(Et=k(v),typeof Et=="function")for(v=Et.call(v),Et=0;!(G=v.next()).done;)G=G.value,tt=Zt+Me(G,Et++),it+=z(G,N,H,tt,J);else if(tt==="object"){if(typeof v.then=="function")return z(te(v),N,H,G,J);throw N=String(v),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return it}function R(v,N,H){if(v==null)return v;var G=[],J=0;return z(v,G,"","",function(tt){return N.call(H,tt,J++)}),G}function X(v){if(v._status===-1){var N=v._result;N=N(),N.then(function(H){(v._status===0||v._status===-1)&&(v._status=1,v._result=H)},function(H){(v._status===0||v._status===-1)&&(v._status=2,v._result=H)}),v._status===-1&&(v._status=0,v._result=N)}if(v._status===1)return v._result.default;throw v._result}var dt=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},ft={map:R,forEach:function(v,N,H){R(v,function(){N.apply(this,arguments)},H)},count:function(v){var N=0;return R(v,function(){N++}),N},toArray:function(v){return R(v,function(N){return N})||[]},only:function(v){if(!Wt(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return $.Activity=E,$.Children=ft,$.Component=W,$.Fragment=h,$.Profiler=x,$.PureComponent=Ot,$.StrictMode=o,$.Suspense=q,$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,$.__COMPILER_RUNTIME={__proto__:null,c:function(v){return F.H.useMemoCache(v)}},$.cache=function(v){return function(){return v.apply(null,arguments)}},$.cacheSignal=function(){return null},$.cloneElement=function(v,N,H){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var G=C({},v.props),J=v.key;if(N!=null)for(tt in N.key!==void 0&&(J=""+N.key),N)!vt.call(N,tt)||tt==="key"||tt==="__self"||tt==="__source"||tt==="ref"&&N.ref===void 0||(G[tt]=N[tt]);var tt=arguments.length-2;if(tt===1)G.children=H;else if(1<tt){for(var it=Array(tt),Zt=0;Zt<tt;Zt++)it[Zt]=arguments[Zt+2];G.children=it}return Pt(v.type,J,G)},$.createContext=function(v){return v={$$typeof:D,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:j,_context:v},v},$.createElement=function(v,N,H){var G,J={},tt=null;if(N!=null)for(G in N.key!==void 0&&(tt=""+N.key),N)vt.call(N,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(J[G]=N[G]);var it=arguments.length-2;if(it===1)J.children=H;else if(1<it){for(var Zt=Array(it),Et=0;Et<it;Et++)Zt[Et]=arguments[Et+2];J.children=Zt}if(v&&v.defaultProps)for(G in it=v.defaultProps,it)J[G]===void 0&&(J[G]=it[G]);return Pt(v,tt,J)},$.createRef=function(){return{current:null}},$.forwardRef=function(v){return{$$typeof:V,render:v}},$.isValidElement=Wt,$.lazy=function(v){return{$$typeof:U,_payload:{_status:-1,_result:v},_init:X}},$.memo=function(v,N){return{$$typeof:S,type:v,compare:N===void 0?null:N}},$.startTransition=function(v){var N=F.T,H={};F.T=H;try{var G=v(),J=F.S;J!==null&&J(H,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(Yt,dt)}catch(tt){dt(tt)}finally{N!==null&&H.types!==null&&(N.types=H.types),F.T=N}},$.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},$.use=function(v){return F.H.use(v)},$.useActionState=function(v,N,H){return F.H.useActionState(v,N,H)},$.useCallback=function(v,N){return F.H.useCallback(v,N)},$.useContext=function(v){return F.H.useContext(v)},$.useDebugValue=function(){},$.useDeferredValue=function(v,N){return F.H.useDeferredValue(v,N)},$.useEffect=function(v,N){return F.H.useEffect(v,N)},$.useEffectEvent=function(v){return F.H.useEffectEvent(v)},$.useId=function(){return F.H.useId()},$.useImperativeHandle=function(v,N,H){return F.H.useImperativeHandle(v,N,H)},$.useInsertionEffect=function(v,N){return F.H.useInsertionEffect(v,N)},$.useLayoutEffect=function(v,N){return F.H.useLayoutEffect(v,N)},$.useMemo=function(v,N){return F.H.useMemo(v,N)},$.useOptimistic=function(v,N){return F.H.useOptimistic(v,N)},$.useReducer=function(v,N,H){return F.H.useReducer(v,N,H)},$.useRef=function(v){return F.H.useRef(v)},$.useState=function(v){return F.H.useState(v)},$.useSyncExternalStore=function(v,N,H){return F.H.useSyncExternalStore(v,N,H)},$.useTransition=function(){return F.H.useTransition()},$.version="19.2.8",$}var qr;function Of(){return qr||(qr=1,mf.exports=Mv()),mf.exports}var L=Of(),gf={exports:{}},Nn={},bf={exports:{}},Sf={};var Br;function Uv(){return Br||(Br=1,(function(c){function s(z,R){var X=z.length;z.push(R);t:for(;0<X;){var dt=X-1>>>1,ft=z[dt];if(0<x(ft,R))z[dt]=R,z[X]=ft,X=dt;else break t}}function h(z){return z.length===0?null:z[0]}function o(z){if(z.length===0)return null;var R=z[0],X=z.pop();if(X!==R){z[0]=X;t:for(var dt=0,ft=z.length,v=ft>>>1;dt<v;){var N=2*(dt+1)-1,H=z[N],G=N+1,J=z[G];if(0>x(H,X))G<ft&&0>x(J,H)?(z[dt]=J,z[G]=X,dt=G):(z[dt]=H,z[N]=X,dt=N);else if(G<ft&&0>x(J,X))z[dt]=J,z[G]=X,dt=G;else break t}}return R}function x(z,R){var X=z.sortIndex-R.sortIndex;return X!==0?X:z.id-R.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var j=performance;c.unstable_now=function(){return j.now()}}else{var D=Date,V=D.now();c.unstable_now=function(){return D.now()-V}}var q=[],S=[],U=1,E=null,M=3,k=!1,ct=!1,C=!1,Tt=!1,W=typeof setTimeout=="function"?setTimeout:null,It=typeof clearTimeout=="function"?clearTimeout:null,Ot=typeof setImmediate<"u"?setImmediate:null;function Nt(z){for(var R=h(S);R!==null;){if(R.callback===null)o(S);else if(R.startTime<=z)o(S),R.sortIndex=R.expirationTime,s(q,R);else break;R=h(S)}}function fe(z){if(C=!1,Nt(z),!ct)if(h(q)!==null)ct=!0,Yt||(Yt=!0,wt());else{var R=h(S);R!==null&&te(fe,R.startTime-z)}}var Yt=!1,F=-1,vt=5,Pt=-1;function St(){return Tt?!0:!(c.unstable_now()-Pt<vt)}function Wt(){if(Tt=!1,Yt){var z=c.unstable_now();Pt=z;var R=!0;try{t:{ct=!1,C&&(C=!1,It(F),F=-1),k=!0;var X=M;try{e:{for(Nt(z),E=h(q);E!==null&&!(E.expirationTime>z&&St());){var dt=E.callback;if(typeof dt=="function"){E.callback=null,M=E.priorityLevel;var ft=dt(E.expirationTime<=z);if(z=c.unstable_now(),typeof ft=="function"){E.callback=ft,Nt(z),R=!0;break e}E===h(q)&&o(q),Nt(z)}else o(q);E=h(q)}if(E!==null)R=!0;else{var v=h(S);v!==null&&te(fe,v.startTime-z),R=!1}}break t}finally{E=null,M=X,k=!1}R=void 0}}finally{R?wt():Yt=!1}}}var wt;if(typeof Ot=="function")wt=function(){Ot(Wt)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,Me=we.port2;we.port1.onmessage=Wt,wt=function(){Me.postMessage(null)}}else wt=function(){W(Wt,0)};function te(z,R){F=W(function(){z(c.unstable_now())},R)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(z){z.callback=null},c.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):vt=0<z?Math.floor(1e3/z):5},c.unstable_getCurrentPriorityLevel=function(){return M},c.unstable_next=function(z){switch(M){case 1:case 2:case 3:var R=3;break;default:R=M}var X=M;M=R;try{return z()}finally{M=X}},c.unstable_requestPaint=function(){Tt=!0},c.unstable_runWithPriority=function(z,R){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var X=M;M=z;try{return R()}finally{M=X}},c.unstable_scheduleCallback=function(z,R,X){var dt=c.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?dt+X:dt):X=dt,z){case 1:var ft=-1;break;case 2:ft=250;break;case 5:ft=1073741823;break;case 4:ft=1e4;break;default:ft=5e3}return ft=X+ft,z={id:U++,callback:R,priorityLevel:z,startTime:X,expirationTime:ft,sortIndex:-1},X>dt?(z.sortIndex=X,s(S,z),h(q)===null&&z===h(S)&&(C?(It(F),F=-1):C=!0,te(fe,X-dt))):(z.sortIndex=ft,s(q,z),ct||k||(ct=!0,Yt||(Yt=!0,wt()))),z},c.unstable_shouldYield=St,c.unstable_wrapCallback=function(z){var R=M;return function(){var X=M;M=R;try{return z.apply(this,arguments)}finally{M=X}}}})(Sf)),Sf}var Yr;function Dv(){return Yr||(Yr=1,bf.exports=Uv()),bf.exports}var pf={exports:{}},$t={};var Gr;function Cv(){if(Gr)return $t;Gr=1;var c=Of();function s(q){var S="https://react.dev/errors/"+q;if(1<arguments.length){S+="?args[]="+encodeURIComponent(arguments[1]);for(var U=2;U<arguments.length;U++)S+="&args[]="+encodeURIComponent(arguments[U])}return"Minified React error #"+q+"; visit "+S+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(){}var o={d:{f:h,r:function(){throw Error(s(522))},D:h,C:h,L:h,m:h,X:h,S:h,M:h},p:0,findDOMNode:null},x=Symbol.for("react.portal");function j(q,S,U){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:x,key:E==null?null:""+E,children:q,containerInfo:S,implementation:U}}var D=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function V(q,S){if(q==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,$t.createPortal=function(q,S){var U=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S||S.nodeType!==1&&S.nodeType!==9&&S.nodeType!==11)throw Error(s(299));return j(q,S,null,U)},$t.flushSync=function(q){var S=D.T,U=o.p;try{if(D.T=null,o.p=2,q)return q()}finally{D.T=S,o.p=U,o.d.f()}},$t.preconnect=function(q,S){typeof q=="string"&&(S?(S=S.crossOrigin,S=typeof S=="string"?S==="use-credentials"?S:"":void 0):S=null,o.d.C(q,S))},$t.prefetchDNS=function(q){typeof q=="string"&&o.d.D(q)},$t.preinit=function(q,S){if(typeof q=="string"&&S&&typeof S.as=="string"){var U=S.as,E=V(U,S.crossOrigin),M=typeof S.integrity=="string"?S.integrity:void 0,k=typeof S.fetchPriority=="string"?S.fetchPriority:void 0;U==="style"?o.d.S(q,typeof S.precedence=="string"?S.precedence:void 0,{crossOrigin:E,integrity:M,fetchPriority:k}):U==="script"&&o.d.X(q,{crossOrigin:E,integrity:M,fetchPriority:k,nonce:typeof S.nonce=="string"?S.nonce:void 0})}},$t.preinitModule=function(q,S){if(typeof q=="string")if(typeof S=="object"&&S!==null){if(S.as==null||S.as==="script"){var U=V(S.as,S.crossOrigin);o.d.M(q,{crossOrigin:U,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0})}}else S==null&&o.d.M(q)},$t.preload=function(q,S){if(typeof q=="string"&&typeof S=="object"&&S!==null&&typeof S.as=="string"){var U=S.as,E=V(U,S.crossOrigin);o.d.L(q,U,{crossOrigin:E,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0,type:typeof S.type=="string"?S.type:void 0,fetchPriority:typeof S.fetchPriority=="string"?S.fetchPriority:void 0,referrerPolicy:typeof S.referrerPolicy=="string"?S.referrerPolicy:void 0,imageSrcSet:typeof S.imageSrcSet=="string"?S.imageSrcSet:void 0,imageSizes:typeof S.imageSizes=="string"?S.imageSizes:void 0,media:typeof S.media=="string"?S.media:void 0})}},$t.preloadModule=function(q,S){if(typeof q=="string")if(S){var U=V(S.as,S.crossOrigin);o.d.m(q,{as:typeof S.as=="string"&&S.as!=="script"?S.as:void 0,crossOrigin:U,integrity:typeof S.integrity=="string"?S.integrity:void 0})}else o.d.m(q)},$t.requestFormReset=function(q){o.d.r(q)},$t.unstable_batchedUpdates=function(q,S){return q(S)},$t.useFormState=function(q,S,U){return D.H.useFormState(q,S,U)},$t.useFormStatus=function(){return D.H.useHostTransitionStatus()},$t.version="19.2.8",$t}var wr;function Rv(){if(wr)return pf.exports;wr=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(s){console.error(s)}}return c(),pf.exports=Cv(),pf.exports}var Xr;function Hv(){if(Xr)return Nn;Xr=1;var c=Dv(),s=Of(),h=Rv();function o(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function x(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function j(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function D(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function V(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function q(t){if(j(t)!==t)throw Error(o(188))}function S(t){var e=t.alternate;if(!e){if(e=j(t),e===null)throw Error(o(188));return e!==t?null:t}for(var l=t,a=e;;){var n=l.return;if(n===null)break;var u=n.alternate;if(u===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===l)return q(n),t;if(u===a)return q(n),e;u=u.sibling}throw Error(o(188))}if(l.return!==a.return)l=n,a=u;else{for(var i=!1,f=n.child;f;){if(f===l){i=!0,l=n,a=u;break}if(f===a){i=!0,a=n,l=u;break}f=f.sibling}if(!i){for(f=u.child;f;){if(f===l){i=!0,l=u,a=n;break}if(f===a){i=!0,a=u,l=n;break}f=f.sibling}if(!i)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?t:e}function U(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=U(t),e!==null)return e;t=t.sibling}return null}var E=Object.assign,M=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),ct=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),Tt=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),It=Symbol.for("react.consumer"),Ot=Symbol.for("react.context"),Nt=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),Yt=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),vt=Symbol.for("react.lazy"),Pt=Symbol.for("react.activity"),St=Symbol.for("react.memo_cache_sentinel"),Wt=Symbol.iterator;function wt(t){return t===null||typeof t!="object"?null:(t=Wt&&t[Wt]||t["@@iterator"],typeof t=="function"?t:null)}var we=Symbol.for("react.client.reference");function Me(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===we?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case W:return"Profiler";case Tt:return"StrictMode";case fe:return"Suspense";case Yt:return"SuspenseList";case Pt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case ct:return"Portal";case Ot:return t.displayName||"Context";case It:return(t._context.displayName||"Context")+".Consumer";case Nt:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case F:return e=t.displayName||null,e!==null?e:Me(t.type)||"Memo";case vt:e=t._payload,t=t._init;try{return Me(t(e))}catch{}}return null}var te=Array.isArray,z=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=h.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},dt=[],ft=-1;function v(t){return{current:t}}function N(t){0>ft||(t.current=dt[ft],dt[ft]=null,ft--)}function H(t,e){ft++,dt[ft]=t.current,t.current=e}var G=v(null),J=v(null),tt=v(null),it=v(null);function Zt(t,e){switch(H(tt,e),H(J,t),H(G,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?lr(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=lr(e),t=ar(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}N(G),H(G,t)}function Et(){N(G),N(J),N(tt)}function Ul(t){t.memoizedState!==null&&H(it,t);var e=G.current,l=ar(e,t.type);e!==l&&(H(J,t),H(G,l))}function B(t){J.current===t&&(N(G),N(J)),it.current===t&&(N(it),An._currentValue=X)}var K,xt;function zt(t){if(K===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\\n( *(at )?)/);K=e&&e[1]||"",xt=-1<l.stack.indexOf(\`
9
- at\`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return\`
10
- \`+K+t+xt}var se=!1;function Iu(t,e){if(!t||se)return"";se=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(e){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(T){var p=T}Reflect.construct(t,[],O)}else{try{O.call()}catch(T){p=T}t.call(O.prototype)}}else{try{throw Error()}catch(T){p=T}(O=t())&&typeof O.catch=="function"&&O.catch(function(){})}}catch(T){if(T&&p&&typeof T.stack=="string")return[T.stack,p.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),i=u[0],f=u[1];if(i&&f){var r=i.split(\`
11
- \`),b=f.split(\`
12
- \`);for(n=a=0;a<r.length&&!r[a].includes("DetermineComponentFrameRoot");)a++;for(;n<b.length&&!b[n].includes("DetermineComponentFrameRoot");)n++;if(a===r.length||n===b.length)for(a=r.length-1,n=b.length-1;1<=a&&0<=n&&r[a]!==b[n];)n--;for(;1<=a&&0<=n;a--,n--)if(r[a]!==b[n]){if(a!==1||n!==1)do if(a--,n--,0>n||r[a]!==b[n]){var A=\`
13
- \`+r[a].replace(" at new "," at ");return t.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",t.displayName)),A}while(1<=a&&0<=n);break}}}finally{se=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?zt(l):""}function uh(t,e){switch(t.tag){case 26:case 27:case 5:return zt(t.type);case 16:return zt("Lazy");case 13:return t.child!==e&&e!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return Iu(t.type,!1);case 11:return Iu(t.type.render,!1);case 1:return Iu(t.type,!0);case 31:return zt("Activity");default:return""}}function Df(t){try{var e="",l=null;do e+=uh(t,l),l=t,t=t.return;while(t);return e}catch(a){return\`
14
- Error generating stack: \`+a.message+\`
15
- \`+a.stack}}var Pu=Object.prototype.hasOwnProperty,ti=c.unstable_scheduleCallback,ei=c.unstable_cancelCallback,ih=c.unstable_shouldYield,ch=c.unstable_requestPaint,oe=c.unstable_now,fh=c.unstable_getCurrentPriorityLevel,Cf=c.unstable_ImmediatePriority,Rf=c.unstable_UserBlockingPriority,Un=c.unstable_NormalPriority,sh=c.unstable_LowPriority,Hf=c.unstable_IdlePriority,oh=c.log,dh=c.unstable_setDisableYieldValue,Ha=null,de=null;function il(t){if(typeof oh=="function"&&dh(t),de&&typeof de.setStrictMode=="function")try{de.setStrictMode(Ha,t)}catch{}}var re=Math.clz32?Math.clz32:yh,rh=Math.log,hh=Math.LN2;function yh(t){return t>>>=0,t===0?32:31-(rh(t)/hh|0)|0}var Dn=256,Cn=262144,Rn=4194304;function Dl(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Hn(t,e,l){var a=t.pendingLanes;if(a===0)return 0;var n=0,u=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=a&134217727;return f!==0?(a=f&~u,a!==0?n=Dl(a):(i&=f,i!==0?n=Dl(i):l||(l=f&~t,l!==0&&(n=Dl(l))))):(f=a&~u,f!==0?n=Dl(f):i!==0?n=Dl(i):l||(l=a&~t,l!==0&&(n=Dl(l)))),n===0?0:e!==0&&e!==n&&(e&u)===0&&(u=n&-n,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:n}function qa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function vh(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qf(){var t=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),t}function li(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Ba(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function mh(t,e,l,a,n,u){var i=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var f=t.entanglements,r=t.expirationTimes,b=t.hiddenUpdates;for(l=i&~l;0<l;){var A=31-re(l),O=1<<A;f[A]=0,r[A]=-1;var p=b[A];if(p!==null)for(b[A]=null,A=0;A<p.length;A++){var T=p[A];T!==null&&(T.lane&=-536870913)}l&=~O}a!==0&&Bf(t,a,0),u!==0&&n===0&&t.tag!==0&&(t.suspendedLanes|=u&~(i&~e))}function Bf(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var a=31-re(e);t.entangledLanes|=e,t.entanglements[a]=t.entanglements[a]|1073741824|l&261930}function Yf(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var a=31-re(l),n=1<<a;n&e|t[a]&e&&(t[a]|=e),l&=~n}}function Gf(t,e){var l=e&-e;return l=(l&42)!==0?1:ai(l),(l&(t.suspendedLanes|e))!==0?0:l}function ai(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ni(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function wf(){var t=R.p;return t!==0?t:(t=window.event,t===void 0?32:jr(t.type))}function Xf(t,e){var l=R.p;try{return R.p=t,e()}finally{R.p=l}}var cl=Math.random().toString(36).slice(2),Lt="__reactFiber$"+cl,ee="__reactProps$"+cl,Fl="__reactContainer$"+cl,ui="__reactEvents$"+cl,gh="__reactListeners$"+cl,bh="__reactHandles$"+cl,Qf="__reactResources$"+cl,Ya="__reactMarker$"+cl;function ii(t){delete t[Lt],delete t[ee],delete t[ui],delete t[gh],delete t[bh]}function Il(t){var e=t[Lt];if(e)return e;for(var l=t.parentNode;l;){if(e=l[Fl]||l[Lt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=or(t);t!==null;){if(l=t[Lt])return l;t=or(t)}return e}t=l,l=t.parentNode}return null}function Pl(t){if(t=t[Lt]||t[Fl]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ga(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(o(33))}function ta(t){var e=t[Qf];return e||(e=t[Qf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Xt(t){t[Ya]=!0}var Zf=new Set,Lf={};function Cl(t,e){ea(t,e),ea(t+"Capture",e)}function ea(t,e){for(Lf[t]=e,t=0;t<e.length;t++)Zf.add(e[t])}var Sh=RegExp("^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$"),Kf={},Vf={};function ph(t){return Pu.call(Vf,t)?!0:Pu.call(Kf,t)?!1:Sh.test(t)?Vf[t]=!0:(Kf[t]=!0,!1)}function qn(t,e,l){if(ph(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var a=e.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function Bn(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function Xe(t,e,l,a){if(a===null)t.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+a)}}function pe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Jf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Th(t,e,l){var a=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(i){l=""+i,u.call(this,i)}}),Object.defineProperty(t,e,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(i){l=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ci(t){if(!t._valueTracker){var e=Jf(t)?"checked":"value";t._valueTracker=Th(t,e,""+t[e])}}function kf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),a="";return t&&(a=Jf(t)?t.checked?"true":"false":t.value),t=a,t!==l?(e.setValue(t),!0):!1}function Yn(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Eh=/[\\n"\\\\]/g;function Te(t){return t.replace(Eh,function(e){return"\\\\"+e.charCodeAt(0).toString(16)+" "})}function fi(t,e,l,a,n,u,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),e!=null?i==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+pe(e)):t.value!==""+pe(e)&&(t.value=""+pe(e)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),e!=null?si(t,i,pe(e)):l!=null?si(t,i,pe(l)):a!=null&&t.removeAttribute("value"),n==null&&u!=null&&(t.defaultChecked=!!u),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+pe(f):t.removeAttribute("name")}function $f(t,e,l,a,n,u,i,f){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){ci(t);return}l=l!=null?""+pe(l):"",e=e!=null?""+pe(e):l,f||e===t.value||(t.value=e),t.defaultValue=e}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=f?t.checked:!!a,t.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),ci(t)}function si(t,e,l){e==="number"&&Yn(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function la(t,e,l,a){if(t=t.options,e){e={};for(var n=0;n<l.length;n++)e["$"+l[n]]=!0;for(l=0;l<t.length;l++)n=e.hasOwnProperty("$"+t[l].value),t[l].selected!==n&&(t[l].selected=n),n&&a&&(t[l].defaultSelected=!0)}else{for(l=""+pe(l),e=null,n=0;n<t.length;n++){if(t[n].value===l){t[n].selected=!0,a&&(t[n].defaultSelected=!0);return}e!==null||t[n].disabled||(e=t[n])}e!==null&&(e.selected=!0)}}function Wf(t,e,l){if(e!=null&&(e=""+pe(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+pe(l):""}function Ff(t,e,l,a){if(e==null){if(a!=null){if(l!=null)throw Error(o(92));if(te(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),e=l}l=pe(e),t.defaultValue=l,a=t.textContent,a===l&&a!==""&&a!==null&&(t.value=a),ci(t)}function aa(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var zh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function If(t,e,l){var a=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":a?t.setProperty(e,l):typeof l!="number"||l===0||zh.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function Pf(t,e,l){if(e!=null&&typeof e!="object")throw Error(o(62));if(t=t.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||e!=null&&e.hasOwnProperty(a)||(a.indexOf("--")===0?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="");for(var n in e)a=e[n],e.hasOwnProperty(n)&&l[n]!==a&&If(t,n,a)}else for(var u in e)e.hasOwnProperty(u)&&If(t,u,e[u])}function oi(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ah=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_h=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function Gn(t){return _h.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Qe(){}var di=null;function ri(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var na=null,ua=null;function ts(t){var e=Pl(t);if(e&&(t=e.stateNode)){var l=t[ee]||null;t:switch(t=e.stateNode,e.type){case"input":if(fi(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Te(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var a=l[e];if(a!==t&&a.form===t.form){var n=a[ee]||null;if(!n)throw Error(o(90));fi(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(e=0;e<l.length;e++)a=l[e],a.form===t.form&&kf(a)}break t;case"textarea":Wf(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&la(t,!!l.multiple,e,!1)}}}var hi=!1;function es(t,e,l){if(hi)return t(e,l);hi=!0;try{var a=t(e);return a}finally{if(hi=!1,(na!==null||ua!==null)&&(ju(),na&&(e=na,t=ua,ua=na=null,ts(e),t)))for(e=0;e<t.length;e++)ts(t[e])}}function wa(t,e){var l=t.stateNode;if(l===null)return null;var a=l[ee]||null;if(a===null)return null;l=a[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(t=t.type,a=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!a;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(o(231,e,typeof l));return l}var Ze=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yi=!1;if(Ze)try{var Xa={};Object.defineProperty(Xa,"passive",{get:function(){yi=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch{yi=!1}var fl=null,vi=null,wn=null;function ls(){if(wn)return wn;var t,e=vi,l=e.length,a,n="value"in fl?fl.value:fl.textContent,u=n.length;for(t=0;t<l&&e[t]===n[t];t++);var i=l-t;for(a=1;a<=i&&e[l-a]===n[u-a];a++);return wn=n.slice(t,1<a?1-a:void 0)}function Xn(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Qn(){return!0}function as(){return!1}function le(t){function e(l,a,n,u,i){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var f in t)t.hasOwnProperty(f)&&(l=t[f],this[f]=l?l(u):u[f]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Qn:as,this.isPropagationStopped=as,this}return E(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Qn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Qn)},persist:function(){},isPersistent:Qn}),e}var Rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zn=le(Rl),Qa=E({},Rl,{view:0,detail:0}),jh=le(Qa),mi,gi,Za,Ln=E({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Si,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Za&&(Za&&t.type==="mousemove"?(mi=t.screenX-Za.screenX,gi=t.screenY-Za.screenY):gi=mi=0,Za=t),mi)},movementY:function(t){return"movementY"in t?t.movementY:gi}}),ns=le(Ln),xh=E({},Ln,{dataTransfer:0}),Oh=le(xh),Nh=E({},Qa,{relatedTarget:0}),bi=le(Nh),Mh=E({},Rl,{animationName:0,elapsedTime:0,pseudoElement:0}),Uh=le(Mh),Dh=E({},Rl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ch=le(Dh),Rh=E({},Rl,{data:0}),us=le(Rh),Hh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Bh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yh(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Bh[t])?!!e[t]:!1}function Si(){return Yh}var Gh=E({},Qa,{key:function(t){if(t.key){var e=Hh[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Xn(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qh[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Si,charCode:function(t){return t.type==="keypress"?Xn(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Xn(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),wh=le(Gh),Xh=E({},Ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),is=le(Xh),Qh=E({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Si}),Zh=le(Qh),Lh=E({},Rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kh=le(Lh),Vh=E({},Ln,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Jh=le(Vh),kh=E({},Rl,{newState:0,oldState:0}),$h=le(kh),Wh=[9,13,27,32],pi=Ze&&"CompositionEvent"in window,La=null;Ze&&"documentMode"in document&&(La=document.documentMode);var Fh=Ze&&"TextEvent"in window&&!La,cs=Ze&&(!pi||La&&8<La&&11>=La),fs=" ",ss=!1;function os(t,e){switch(t){case"keyup":return Wh.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ds(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ia=!1;function Ih(t,e){switch(t){case"compositionend":return ds(e);case"keypress":return e.which!==32?null:(ss=!0,fs);case"textInput":return t=e.data,t===fs&&ss?null:t;default:return null}}function Ph(t,e){if(ia)return t==="compositionend"||!pi&&os(t,e)?(t=ls(),wn=vi=fl=null,ia=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return cs&&e.locale!=="ko"?null:e.data;default:return null}}var ty={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!ty[t.type]:e==="textarea"}function hs(t,e,l,a){na?ua?ua.push(a):ua=[a]:na=a,e=Cu(e,"onChange"),0<e.length&&(l=new Zn("onChange","change",null,l,a),t.push({event:l,listeners:e}))}var Ka=null,Va=null;function ey(t){Wd(t,0)}function Kn(t){var e=Ga(t);if(kf(e))return t}function ys(t,e){if(t==="change")return e}var vs=!1;if(Ze){var Ti;if(Ze){var Ei="oninput"in document;if(!Ei){var ms=document.createElement("div");ms.setAttribute("oninput","return;"),Ei=typeof ms.oninput=="function"}Ti=Ei}else Ti=!1;vs=Ti&&(!document.documentMode||9<document.documentMode)}function gs(){Ka&&(Ka.detachEvent("onpropertychange",bs),Va=Ka=null)}function bs(t){if(t.propertyName==="value"&&Kn(Va)){var e=[];hs(e,Va,t,ri(t)),es(ey,e)}}function ly(t,e,l){t==="focusin"?(gs(),Ka=e,Va=l,Ka.attachEvent("onpropertychange",bs)):t==="focusout"&&gs()}function ay(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Kn(Va)}function ny(t,e){if(t==="click")return Kn(e)}function uy(t,e){if(t==="input"||t==="change")return Kn(e)}function iy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var he=typeof Object.is=="function"?Object.is:iy;function Ja(t,e){if(he(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),a=Object.keys(e);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!Pu.call(e,n)||!he(t[n],e[n]))return!1}return!0}function Ss(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ps(t,e){var l=Ss(t);t=0;for(var a;l;){if(l.nodeType===3){if(a=t+l.textContent.length,t<=e&&a>=e)return{node:l,offset:e-t};t=a}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Ss(l)}}function Ts(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ts(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Es(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Yn(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Yn(t.document)}return e}function zi(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var cy=Ze&&"documentMode"in document&&11>=document.documentMode,ca=null,Ai=null,ka=null,_i=!1;function zs(t,e,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_i||ca==null||ca!==Yn(a)||(a=ca,"selectionStart"in a&&zi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ka&&Ja(ka,a)||(ka=a,a=Cu(Ai,"onSelect"),0<a.length&&(e=new Zn("onSelect","select",null,e,l),t.push({event:e,listeners:a}),e.target=ca)))}function Hl(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var fa={animationend:Hl("Animation","AnimationEnd"),animationiteration:Hl("Animation","AnimationIteration"),animationstart:Hl("Animation","AnimationStart"),transitionrun:Hl("Transition","TransitionRun"),transitionstart:Hl("Transition","TransitionStart"),transitioncancel:Hl("Transition","TransitionCancel"),transitionend:Hl("Transition","TransitionEnd")},ji={},As={};Ze&&(As=document.createElement("div").style,"AnimationEvent"in window||(delete fa.animationend.animation,delete fa.animationiteration.animation,delete fa.animationstart.animation),"TransitionEvent"in window||delete fa.transitionend.transition);function ql(t){if(ji[t])return ji[t];if(!fa[t])return t;var e=fa[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in As)return ji[t]=e[l];return t}var _s=ql("animationend"),js=ql("animationiteration"),xs=ql("animationstart"),fy=ql("transitionrun"),sy=ql("transitionstart"),oy=ql("transitioncancel"),Os=ql("transitionend"),Ns=new Map,xi="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");xi.push("scrollEnd");function Ue(t,e){Ns.set(t,e),Cl(e,[t])}var Vn=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ee=[],sa=0,Oi=0;function Jn(){for(var t=sa,e=Oi=sa=0;e<t;){var l=Ee[e];Ee[e++]=null;var a=Ee[e];Ee[e++]=null;var n=Ee[e];Ee[e++]=null;var u=Ee[e];if(Ee[e++]=null,a!==null&&n!==null){var i=a.pending;i===null?n.next=n:(n.next=i.next,i.next=n),a.pending=n}u!==0&&Ms(l,n,u)}}function kn(t,e,l,a){Ee[sa++]=t,Ee[sa++]=e,Ee[sa++]=l,Ee[sa++]=a,Oi|=a,t.lanes|=a,t=t.alternate,t!==null&&(t.lanes|=a)}function Ni(t,e,l,a){return kn(t,e,l,a),$n(t)}function Bl(t,e){return kn(t,null,null,e),$n(t)}function Ms(t,e,l){t.lanes|=l;var a=t.alternate;a!==null&&(a.lanes|=l);for(var n=!1,u=t.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(n=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,n&&e!==null&&(n=31-re(l),t=u.hiddenUpdates,a=t[n],a===null?t[n]=[e]:a.push(e),e.lane=l|536870912),u):null}function $n(t){if(50<gn)throw gn=0,Yc=null,Error(o(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var oa={};function dy(t,e,l,a){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ye(t,e,l,a){return new dy(t,e,l,a)}function Mi(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Le(t,e){var l=t.alternate;return l===null?(l=ye(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Us(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Wn(t,e,l,a,n,u){var i=0;if(a=t,typeof t=="function")Mi(t)&&(i=1);else if(typeof t=="string")i=mv(t,l,G.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Pt:return t=ye(31,l,e,n),t.elementType=Pt,t.lanes=u,t;case C:return Yl(l.children,n,u,e);case Tt:i=8,n|=24;break;case W:return t=ye(12,l,e,n|2),t.elementType=W,t.lanes=u,t;case fe:return t=ye(13,l,e,n),t.elementType=fe,t.lanes=u,t;case Yt:return t=ye(19,l,e,n),t.elementType=Yt,t.lanes=u,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Ot:i=10;break t;case It:i=9;break t;case Nt:i=11;break t;case F:i=14;break t;case vt:i=16,a=null;break t}i=29,l=Error(o(130,t===null?"null":typeof t,"")),a=null}return e=ye(i,l,e,n),e.elementType=t,e.type=a,e.lanes=u,e}function Yl(t,e,l,a){return t=ye(7,t,a,e),t.lanes=l,t}function Ui(t,e,l){return t=ye(6,t,null,e),t.lanes=l,t}function Ds(t){var e=ye(18,null,null,0);return e.stateNode=t,e}function Di(t,e,l){return e=ye(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Cs=new WeakMap;function ze(t,e){if(typeof t=="object"&&t!==null){var l=Cs.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Df(e)},Cs.set(t,e),e)}return{value:t,source:e,stack:Df(e)}}var da=[],ra=0,Fn=null,$a=0,Ae=[],_e=0,sl=null,Re=1,He="";function Ke(t,e){da[ra++]=$a,da[ra++]=Fn,Fn=t,$a=e}function Rs(t,e,l){Ae[_e++]=Re,Ae[_e++]=He,Ae[_e++]=sl,sl=t;var a=Re;t=He;var n=32-re(a)-1;a&=~(1<<n),l+=1;var u=32-re(e)+n;if(30<u){var i=n-n%5;u=(a&(1<<i)-1).toString(32),a>>=i,n-=i,Re=1<<32-re(e)+n|l<<n|a,He=u+t}else Re=1<<u|l<<n|a,He=t}function Ci(t){t.return!==null&&(Ke(t,1),Rs(t,1,0))}function Ri(t){for(;t===Fn;)Fn=da[--ra],da[ra]=null,$a=da[--ra],da[ra]=null;for(;t===sl;)sl=Ae[--_e],Ae[_e]=null,He=Ae[--_e],Ae[_e]=null,Re=Ae[--_e],Ae[_e]=null}function Hs(t,e){Ae[_e++]=Re,Ae[_e++]=He,Ae[_e++]=sl,Re=e.id,He=e.overflow,sl=t}var Kt=null,At=null,ut=!1,ol=null,je=!1,Hi=Error(o(519));function dl(t){var e=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wa(ze(e,t)),Hi}function qs(t){var e=t.stateNode,l=t.type,a=t.memoizedProps;switch(e[Lt]=t,e[ee]=a,l){case"dialog":lt("cancel",e),lt("close",e);break;case"iframe":case"object":case"embed":lt("load",e);break;case"video":case"audio":for(l=0;l<Sn.length;l++)lt(Sn[l],e);break;case"source":lt("error",e);break;case"img":case"image":case"link":lt("error",e),lt("load",e);break;case"details":lt("toggle",e);break;case"input":lt("invalid",e),$f(e,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":lt("invalid",e);break;case"textarea":lt("invalid",e),Ff(e,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||a.suppressHydrationWarning===!0||tr(e.textContent,l)?(a.popover!=null&&(lt("beforetoggle",e),lt("toggle",e)),a.onScroll!=null&&lt("scroll",e),a.onScrollEnd!=null&&lt("scrollend",e),a.onClick!=null&&(e.onclick=Qe),e=!0):e=!1,e||dl(t,!0)}function Bs(t){for(Kt=t.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:je=!1;return;case 27:case 3:je=!0;return;default:Kt=Kt.return}}function ha(t){if(t!==Kt)return!1;if(!ut)return Bs(t),ut=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Pc(t.type,t.memoizedProps)),l=!l),l&&At&&dl(t),Bs(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));At=sr(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));At=sr(t)}else e===27?(e=At,_l(t.type)?(t=nf,nf=null,At=t):At=e):At=Kt?Oe(t.stateNode.nextSibling):null;return!0}function Gl(){At=Kt=null,ut=!1}function qi(){var t=ol;return t!==null&&(ie===null?ie=t:ie.push.apply(ie,t),ol=null),t}function Wa(t){ol===null?ol=[t]:ol.push(t)}var Bi=v(null),wl=null,Ve=null;function rl(t,e,l){H(Bi,e._currentValue),e._currentValue=l}function Je(t){t._currentValue=Bi.current,N(Bi)}function Yi(t,e,l){for(;t!==null;){var a=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,a!==null&&(a.childLanes|=e)):a!==null&&(a.childLanes&e)!==e&&(a.childLanes|=e),t===l)break;t=t.return}}function Gi(t,e,l,a){var n=t.child;for(n!==null&&(n.return=t);n!==null;){var u=n.dependencies;if(u!==null){var i=n.child;u=u.firstContext;t:for(;u!==null;){var f=u;u=n;for(var r=0;r<e.length;r++)if(f.context===e[r]){u.lanes|=l,f=u.alternate,f!==null&&(f.lanes|=l),Yi(u.return,l,t),a||(i=null);break t}u=f.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(o(341));i.lanes|=l,u=i.alternate,u!==null&&(u.lanes|=l),Yi(i,l,t),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===t){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function ya(t,e,l,a){t=null;for(var n=e,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(o(387));if(i=i.memoizedProps,i!==null){var f=n.type;he(n.pendingProps.value,i.value)||(t!==null?t.push(f):t=[f])}}else if(n===it.current){if(i=n.alternate,i===null)throw Error(o(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(t!==null?t.push(An):t=[An])}n=n.return}t!==null&&Gi(e,t,l,a),e.flags|=262144}function In(t){for(t=t.firstContext;t!==null;){if(!he(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Xl(t){wl=t,Ve=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Vt(t){return Ys(wl,t)}function Pn(t,e){return wl===null&&Xl(t),Ys(t,e)}function Ys(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},Ve===null){if(t===null)throw Error(o(308));Ve=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Ve=Ve.next=e;return l}var ry=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,a){t.push(a)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},hy=c.unstable_scheduleCallback,yy=c.unstable_NormalPriority,Rt={$$typeof:Ot,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wi(){return{controller:new ry,data:new Map,refCount:0}}function Fa(t){t.refCount--,t.refCount===0&&hy(yy,function(){t.controller.abort()})}var Ia=null,Xi=0,va=0,ma=null;function vy(t,e){if(Ia===null){var l=Ia=[];Xi=0,va=Lc(),ma={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Xi++,e.then(Gs,Gs),e}function Gs(){if(--Xi===0&&Ia!==null){ma!==null&&(ma.status="fulfilled");var t=Ia;Ia=null,va=0,ma=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function my(t,e){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return t.then(function(){a.status="fulfilled",a.value=e;for(var n=0;n<l.length;n++)(0,l[n])(e)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var ws=z.S;z.S=function(t,e){Ad=oe(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&vy(t,e),ws!==null&&ws(t,e)};var Ql=v(null);function Qi(){var t=Ql.current;return t!==null?t:pt.pooledCache}function tu(t,e){e===null?H(Ql,Ql.current):H(Ql,e.pool)}function Xs(){var t=Qi();return t===null?null:{parent:Rt._currentValue,pool:t}}var ga=Error(o(460)),Zi=Error(o(474)),eu=Error(o(542)),lu={then:function(){}};function Qs(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Zs(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(Qe,Qe),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Ks(t),t;default:if(typeof e.status=="string")e.then(Qe,Qe);else{if(t=pt,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=e,t.status="pending",t.then(function(a){if(e.status==="pending"){var n=e;n.status="fulfilled",n.value=a}},function(a){if(e.status==="pending"){var n=e;n.status="rejected",n.reason=a}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Ks(t),t}throw Ll=e,ga}}function Zl(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ll=l,ga):l}}var Ll=null;function Ls(){if(Ll===null)throw Error(o(459));var t=Ll;return Ll=null,t}function Ks(t){if(t===ga||t===eu)throw Error(o(483))}var ba=null,Pa=0;function au(t){var e=Pa;return Pa+=1,ba===null&&(ba=[]),Zs(ba,t,e)}function tn(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function nu(t,e){throw e.$$typeof===M?Error(o(525)):(t=Object.prototype.toString.call(e),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Vs(t){function e(m,y){if(t){var g=m.deletions;g===null?(m.deletions=[y],m.flags|=16):g.push(y)}}function l(m,y){if(!t)return null;for(;y!==null;)e(m,y),y=y.sibling;return null}function a(m){for(var y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function n(m,y){return m=Le(m,y),m.index=0,m.sibling=null,m}function u(m,y,g){return m.index=g,t?(g=m.alternate,g!==null?(g=g.index,g<y?(m.flags|=67108866,y):g):(m.flags|=67108866,y)):(m.flags|=1048576,y)}function i(m){return t&&m.alternate===null&&(m.flags|=67108866),m}function f(m,y,g,_){return y===null||y.tag!==6?(y=Ui(g,m.mode,_),y.return=m,y):(y=n(y,g),y.return=m,y)}function r(m,y,g,_){var Q=g.type;return Q===C?A(m,y,g.props.children,_,g.key):y!==null&&(y.elementType===Q||typeof Q=="object"&&Q!==null&&Q.$$typeof===vt&&Zl(Q)===y.type)?(y=n(y,g.props),tn(y,g),y.return=m,y):(y=Wn(g.type,g.key,g.props,null,m.mode,_),tn(y,g),y.return=m,y)}function b(m,y,g,_){return y===null||y.tag!==4||y.stateNode.containerInfo!==g.containerInfo||y.stateNode.implementation!==g.implementation?(y=Di(g,m.mode,_),y.return=m,y):(y=n(y,g.children||[]),y.return=m,y)}function A(m,y,g,_,Q){return y===null||y.tag!==7?(y=Yl(g,m.mode,_,Q),y.return=m,y):(y=n(y,g),y.return=m,y)}function O(m,y,g){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=Ui(""+y,m.mode,g),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case k:return g=Wn(y.type,y.key,y.props,null,m.mode,g),tn(g,y),g.return=m,g;case ct:return y=Di(y,m.mode,g),y.return=m,y;case vt:return y=Zl(y),O(m,y,g)}if(te(y)||wt(y))return y=Yl(y,m.mode,g,null),y.return=m,y;if(typeof y.then=="function")return O(m,au(y),g);if(y.$$typeof===Ot)return O(m,Pn(m,y),g);nu(m,y)}return null}function p(m,y,g,_){var Q=y!==null?y.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return Q!==null?null:f(m,y,""+g,_);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case k:return g.key===Q?r(m,y,g,_):null;case ct:return g.key===Q?b(m,y,g,_):null;case vt:return g=Zl(g),p(m,y,g,_)}if(te(g)||wt(g))return Q!==null?null:A(m,y,g,_,null);if(typeof g.then=="function")return p(m,y,au(g),_);if(g.$$typeof===Ot)return p(m,y,Pn(m,g),_);nu(m,g)}return null}function T(m,y,g,_,Q){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return m=m.get(g)||null,f(y,m,""+_,Q);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case k:return m=m.get(_.key===null?g:_.key)||null,r(y,m,_,Q);case ct:return m=m.get(_.key===null?g:_.key)||null,b(y,m,_,Q);case vt:return _=Zl(_),T(m,y,g,_,Q)}if(te(_)||wt(_))return m=m.get(g)||null,A(y,m,_,Q,null);if(typeof _.then=="function")return T(m,y,g,au(_),Q);if(_.$$typeof===Ot)return T(m,y,g,Pn(y,_),Q);nu(y,_)}return null}function Y(m,y,g,_){for(var Q=null,st=null,w=y,P=y=0,nt=null;w!==null&&P<g.length;P++){w.index>P?(nt=w,w=null):nt=w.sibling;var ot=p(m,w,g[P],_);if(ot===null){w===null&&(w=nt);break}t&&w&&ot.alternate===null&&e(m,w),y=u(ot,y,P),st===null?Q=ot:st.sibling=ot,st=ot,w=nt}if(P===g.length)return l(m,w),ut&&Ke(m,P),Q;if(w===null){for(;P<g.length;P++)w=O(m,g[P],_),w!==null&&(y=u(w,y,P),st===null?Q=w:st.sibling=w,st=w);return ut&&Ke(m,P),Q}for(w=a(w);P<g.length;P++)nt=T(w,m,P,g[P],_),nt!==null&&(t&&nt.alternate!==null&&w.delete(nt.key===null?P:nt.key),y=u(nt,y,P),st===null?Q=nt:st.sibling=nt,st=nt);return t&&w.forEach(function(Ml){return e(m,Ml)}),ut&&Ke(m,P),Q}function Z(m,y,g,_){if(g==null)throw Error(o(151));for(var Q=null,st=null,w=y,P=y=0,nt=null,ot=g.next();w!==null&&!ot.done;P++,ot=g.next()){w.index>P?(nt=w,w=null):nt=w.sibling;var Ml=p(m,w,ot.value,_);if(Ml===null){w===null&&(w=nt);break}t&&w&&Ml.alternate===null&&e(m,w),y=u(Ml,y,P),st===null?Q=Ml:st.sibling=Ml,st=Ml,w=nt}if(ot.done)return l(m,w),ut&&Ke(m,P),Q;if(w===null){for(;!ot.done;P++,ot=g.next())ot=O(m,ot.value,_),ot!==null&&(y=u(ot,y,P),st===null?Q=ot:st.sibling=ot,st=ot);return ut&&Ke(m,P),Q}for(w=a(w);!ot.done;P++,ot=g.next())ot=T(w,m,P,ot.value,_),ot!==null&&(t&&ot.alternate!==null&&w.delete(ot.key===null?P:ot.key),y=u(ot,y,P),st===null?Q=ot:st.sibling=ot,st=ot);return t&&w.forEach(function(xv){return e(m,xv)}),ut&&Ke(m,P),Q}function bt(m,y,g,_){if(typeof g=="object"&&g!==null&&g.type===C&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case k:t:{for(var Q=g.key;y!==null;){if(y.key===Q){if(Q=g.type,Q===C){if(y.tag===7){l(m,y.sibling),_=n(y,g.props.children),_.return=m,m=_;break t}}else if(y.elementType===Q||typeof Q=="object"&&Q!==null&&Q.$$typeof===vt&&Zl(Q)===y.type){l(m,y.sibling),_=n(y,g.props),tn(_,g),_.return=m,m=_;break t}l(m,y);break}else e(m,y);y=y.sibling}g.type===C?(_=Yl(g.props.children,m.mode,_,g.key),_.return=m,m=_):(_=Wn(g.type,g.key,g.props,null,m.mode,_),tn(_,g),_.return=m,m=_)}return i(m);case ct:t:{for(Q=g.key;y!==null;){if(y.key===Q)if(y.tag===4&&y.stateNode.containerInfo===g.containerInfo&&y.stateNode.implementation===g.implementation){l(m,y.sibling),_=n(y,g.children||[]),_.return=m,m=_;break t}else{l(m,y);break}else e(m,y);y=y.sibling}_=Di(g,m.mode,_),_.return=m,m=_}return i(m);case vt:return g=Zl(g),bt(m,y,g,_)}if(te(g))return Y(m,y,g,_);if(wt(g)){if(Q=wt(g),typeof Q!="function")throw Error(o(150));return g=Q.call(g),Z(m,y,g,_)}if(typeof g.then=="function")return bt(m,y,au(g),_);if(g.$$typeof===Ot)return bt(m,y,Pn(m,g),_);nu(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,y!==null&&y.tag===6?(l(m,y.sibling),_=n(y,g),_.return=m,m=_):(l(m,y),_=Ui(g,m.mode,_),_.return=m,m=_),i(m)):l(m,y)}return function(m,y,g,_){try{Pa=0;var Q=bt(m,y,g,_);return ba=null,Q}catch(w){if(w===ga||w===eu)throw w;var st=ye(29,w,null,m.mode);return st.lanes=_,st.return=m,st}finally{}}}var Kl=Vs(!0),Js=Vs(!1),hl=!1;function Li(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ki(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function yl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function vl(t,e,l){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(rt&2)!==0){var n=a.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),a.pending=e,e=$n(t),Ms(t,null,l),e}return kn(t,a,e,l),$n(t)}function en(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,Yf(t,l)}}function Vi(t,e){var l=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?n=u=e:u=u.next=e}else n=u=e;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var Ji=!1;function ln(){if(Ji){var t=ma;if(t!==null)throw t}}function an(t,e,l,a){Ji=!1;var n=t.updateQueue;hl=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,f=n.shared.pending;if(f!==null){n.shared.pending=null;var r=f,b=r.next;r.next=null,i===null?u=b:i.next=b,i=r;var A=t.alternate;A!==null&&(A=A.updateQueue,f=A.lastBaseUpdate,f!==i&&(f===null?A.firstBaseUpdate=b:f.next=b,A.lastBaseUpdate=r))}if(u!==null){var O=n.baseState;i=0,A=b=r=null,f=u;do{var p=f.lane&-536870913,T=p!==f.lane;if(T?(at&p)===p:(a&p)===p){p!==0&&p===va&&(Ji=!0),A!==null&&(A=A.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var Y=t,Z=f;p=e;var bt=l;switch(Z.tag){case 1:if(Y=Z.payload,typeof Y=="function"){O=Y.call(bt,O,p);break t}O=Y;break t;case 3:Y.flags=Y.flags&-65537|128;case 0:if(Y=Z.payload,p=typeof Y=="function"?Y.call(bt,O,p):Y,p==null)break t;O=E({},O,p);break t;case 2:hl=!0}}p=f.callback,p!==null&&(t.flags|=64,T&&(t.flags|=8192),T=n.callbacks,T===null?n.callbacks=[p]:T.push(p))}else T={lane:p,tag:f.tag,payload:f.payload,callback:f.callback,next:null},A===null?(b=A=T,r=O):A=A.next=T,i|=p;if(f=f.next,f===null){if(f=n.shared.pending,f===null)break;T=f,f=T.next,T.next=null,n.lastBaseUpdate=T,n.shared.pending=null}}while(!0);A===null&&(r=O),n.baseState=r,n.firstBaseUpdate=b,n.lastBaseUpdate=A,u===null&&(n.shared.lanes=0),pl|=i,t.lanes=i,t.memoizedState=O}}function ks(t,e){if(typeof t!="function")throw Error(o(191,t));t.call(e)}function $s(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)ks(l[t],e)}var Sa=v(null),uu=v(0);function Ws(t,e){t=ll,H(uu,t),H(Sa,e),ll=t|e.baseLanes}function ki(){H(uu,ll),H(Sa,Sa.current)}function $i(){ll=uu.current,N(Sa),N(uu)}var ve=v(null),xe=null;function ml(t){var e=t.alternate;H(Dt,Dt.current&1),H(ve,t),xe===null&&(e===null||Sa.current!==null||e.memoizedState!==null)&&(xe=t)}function Wi(t){H(Dt,Dt.current),H(ve,t),xe===null&&(xe=t)}function Fs(t){t.tag===22?(H(Dt,Dt.current),H(ve,t),xe===null&&(xe=t)):gl()}function gl(){H(Dt,Dt.current),H(ve,ve.current)}function me(t){N(ve),xe===t&&(xe=null),N(Dt)}var Dt=v(0);function iu(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||lf(l)||af(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ke=0,I=null,mt=null,Ht=null,cu=!1,pa=!1,Vl=!1,fu=0,nn=0,Ta=null,gy=0;function Mt(){throw Error(o(321))}function Fi(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!he(t[l],e[l]))return!1;return!0}function Ii(t,e,l,a,n,u){return ke=u,I=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,z.H=t===null||t.memoizedState===null?Ho:hc,Vl=!1,u=l(a,n),Vl=!1,pa&&(u=Ps(e,l,a,n)),Is(t),u}function Is(t){z.H=fn;var e=mt!==null&&mt.next!==null;if(ke=0,Ht=mt=I=null,cu=!1,nn=0,Ta=null,e)throw Error(o(300));t===null||qt||(t=t.dependencies,t!==null&&In(t)&&(qt=!0))}function Ps(t,e,l,a){I=t;var n=0;do{if(pa&&(Ta=null),nn=0,pa=!1,25<=n)throw Error(o(301));if(n+=1,Ht=mt=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=qo,u=e(l,a)}while(pa);return u}function by(){var t=z.H,e=t.useState()[0];return e=typeof e.then=="function"?un(e):e,t=t.useState()[0],(mt!==null?mt.memoizedState:null)!==t&&(I.flags|=1024),e}function Pi(){var t=fu!==0;return fu=0,t}function tc(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function ec(t){if(cu){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}cu=!1}ke=0,Ht=mt=I=null,pa=!1,nn=fu=0,Ta=null}function Ft(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?I.memoizedState=Ht=t:Ht=Ht.next=t,Ht}function Ct(){if(mt===null){var t=I.alternate;t=t!==null?t.memoizedState:null}else t=mt.next;var e=Ht===null?I.memoizedState:Ht.next;if(e!==null)Ht=e,mt=t;else{if(t===null)throw I.alternate===null?Error(o(467)):Error(o(310));mt=t,t={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Ht===null?I.memoizedState=Ht=t:Ht=Ht.next=t}return Ht}function su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function un(t){var e=nn;return nn+=1,Ta===null&&(Ta=[]),t=Zs(Ta,t,e),e=I,(Ht===null?e.memoizedState:Ht.next)===null&&(e=e.alternate,z.H=e===null||e.memoizedState===null?Ho:hc),t}function ou(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return un(t);if(t.$$typeof===Ot)return Vt(t)}throw Error(o(438,String(t)))}function lc(t){var e=null,l=I.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var a=I.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(e={data:a.data.map(function(n){return n.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=su(),I.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),a=0;a<t;a++)l[a]=St;return e.index++,l}function $e(t,e){return typeof e=="function"?e(t):e}function du(t){var e=Ct();return ac(e,mt,t)}function ac(t,e,l){var a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var n=t.baseQueue,u=a.pending;if(u!==null){if(n!==null){var i=n.next;n.next=u.next,u.next=i}e.baseQueue=n=u,a.pending=null}if(u=t.baseState,n===null)t.memoizedState=u;else{e=n.next;var f=i=null,r=null,b=e,A=!1;do{var O=b.lane&-536870913;if(O!==b.lane?(at&O)===O:(ke&O)===O){var p=b.revertLane;if(p===0)r!==null&&(r=r.next={lane:0,revertLane:0,gesture:null,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null}),O===va&&(A=!0);else if((ke&p)===p){b=b.next,p===va&&(A=!0);continue}else O={lane:0,revertLane:b.revertLane,gesture:null,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null},r===null?(f=r=O,i=u):r=r.next=O,I.lanes|=p,pl|=p;O=b.action,Vl&&l(u,O),u=b.hasEagerState?b.eagerState:l(u,O)}else p={lane:O,revertLane:b.revertLane,gesture:b.gesture,action:b.action,hasEagerState:b.hasEagerState,eagerState:b.eagerState,next:null},r===null?(f=r=p,i=u):r=r.next=p,I.lanes|=O,pl|=O;b=b.next}while(b!==null&&b!==e);if(r===null?i=u:r.next=f,!he(u,t.memoizedState)&&(qt=!0,A&&(l=ma,l!==null)))throw l;t.memoizedState=u,t.baseState=i,t.baseQueue=r,a.lastRenderedState=u}return n===null&&(a.lanes=0),[t.memoizedState,a.dispatch]}function nc(t){var e=Ct(),l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=t;var a=l.dispatch,n=l.pending,u=e.memoizedState;if(n!==null){l.pending=null;var i=n=n.next;do u=t(u,i.action),i=i.next;while(i!==n);he(u,e.memoizedState)||(qt=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),l.lastRenderedState=u}return[u,a]}function to(t,e,l){var a=I,n=Ct(),u=ut;if(u){if(l===void 0)throw Error(o(407));l=l()}else l=e();var i=!he((mt||n).memoizedState,l);if(i&&(n.memoizedState=l,qt=!0),n=n.queue,cc(ao.bind(null,a,n,t),[t]),n.getSnapshot!==e||i||Ht!==null&&Ht.memoizedState.tag&1){if(a.flags|=2048,Ea(9,{destroy:void 0},lo.bind(null,a,n,l,e),null),pt===null)throw Error(o(349));u||(ke&127)!==0||eo(a,e,l)}return l}function eo(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=I.updateQueue,e===null?(e=su(),I.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function lo(t,e,l,a){e.value=l,e.getSnapshot=a,no(e)&&uo(t)}function ao(t,e,l){return l(function(){no(e)&&uo(t)})}function no(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!he(t,l)}catch{return!0}}function uo(t){var e=Bl(t,2);e!==null&&ce(e,t,2)}function uc(t){var e=Ft();if(typeof t=="function"){var l=t;if(t=l(),Vl){il(!0);try{l()}finally{il(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$e,lastRenderedState:t},e}function io(t,e,l,a){return t.baseState=l,ac(t,mt,typeof a=="function"?a:$e)}function Sy(t,e,l,a,n){if(yu(t))throw Error(o(485));if(t=e.action,t!==null){var u={payload:n,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){u.listeners.push(i)}};z.T!==null?l(!0):u.isTransition=!1,a(u),l=e.pending,l===null?(u.next=e.pending=u,co(e,u)):(u.next=l.next,e.pending=l.next=u)}}function co(t,e){var l=e.action,a=e.payload,n=t.state;if(e.isTransition){var u=z.T,i={};z.T=i;try{var f=l(n,a),r=z.S;r!==null&&r(i,f),fo(t,e,f)}catch(b){ic(t,e,b)}finally{u!==null&&i.types!==null&&(u.types=i.types),z.T=u}}else try{u=l(n,a),fo(t,e,u)}catch(b){ic(t,e,b)}}function fo(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){so(t,e,a)},function(a){return ic(t,e,a)}):so(t,e,l)}function so(t,e,l){e.status="fulfilled",e.value=l,oo(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,co(t,l)))}function ic(t,e,l){var a=t.pending;if(t.pending=null,a!==null){a=a.next;do e.status="rejected",e.reason=l,oo(e),e=e.next;while(e!==a)}t.action=null}function oo(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function ro(t,e){return e}function ho(t,e){if(ut){var l=pt.formState;if(l!==null){t:{var a=I;if(ut){if(At){e:{for(var n=At,u=je;n.nodeType!==8;){if(!u){n=null;break e}if(n=Oe(n.nextSibling),n===null){n=null;break e}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){At=Oe(n.nextSibling),a=n.data==="F!";break t}}dl(a)}a=!1}a&&(e=l[0])}}return l=Ft(),l.memoizedState=l.baseState=e,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ro,lastRenderedState:e},l.queue=a,l=Do.bind(null,I,a),a.dispatch=l,a=uc(!1),u=rc.bind(null,I,!1,a.queue),a=Ft(),n={state:e,dispatch:null,action:t,pending:null},a.queue=n,l=Sy.bind(null,I,n,u,l),n.dispatch=l,a.memoizedState=t,[e,l,!1]}function yo(t){var e=Ct();return vo(e,mt,t)}function vo(t,e,l){if(e=ac(t,e,ro)[0],t=du($e)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var a=un(e)}catch(i){throw i===ga?eu:i}else a=e;e=Ct();var n=e.queue,u=n.dispatch;return l!==e.memoizedState&&(I.flags|=2048,Ea(9,{destroy:void 0},py.bind(null,n,l),null)),[a,u,t]}function py(t,e){t.action=e}function mo(t){var e=Ct(),l=mt;if(l!==null)return vo(e,l,t);Ct(),e=e.memoizedState,l=Ct();var a=l.queue.dispatch;return l.memoizedState=t,[e,a,!1]}function Ea(t,e,l,a){return t={tag:t,create:l,deps:a,inst:e,next:null},e=I.updateQueue,e===null&&(e=su(),I.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(a=l.next,l.next=t,t.next=a,e.lastEffect=t),t}function go(){return Ct().memoizedState}function ru(t,e,l,a){var n=Ft();I.flags|=t,n.memoizedState=Ea(1|e,{destroy:void 0},l,a===void 0?null:a)}function hu(t,e,l,a){var n=Ct();a=a===void 0?null:a;var u=n.memoizedState.inst;mt!==null&&a!==null&&Fi(a,mt.memoizedState.deps)?n.memoizedState=Ea(e,u,l,a):(I.flags|=t,n.memoizedState=Ea(1|e,u,l,a))}function bo(t,e){ru(8390656,8,t,e)}function cc(t,e){hu(2048,8,t,e)}function Ty(t){I.flags|=4;var e=I.updateQueue;if(e===null)e=su(),I.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function So(t){var e=Ct().memoizedState;return Ty({ref:e,nextImpl:t}),function(){if((rt&2)!==0)throw Error(o(440));return e.impl.apply(void 0,arguments)}}function po(t,e){return hu(4,2,t,e)}function To(t,e){return hu(4,4,t,e)}function Eo(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function zo(t,e,l){l=l!=null?l.concat([t]):null,hu(4,4,Eo.bind(null,e,t),l)}function fc(){}function Ao(t,e){var l=Ct();e=e===void 0?null:e;var a=l.memoizedState;return e!==null&&Fi(e,a[1])?a[0]:(l.memoizedState=[t,e],t)}function _o(t,e){var l=Ct();e=e===void 0?null:e;var a=l.memoizedState;if(e!==null&&Fi(e,a[1]))return a[0];if(a=t(),Vl){il(!0);try{t()}finally{il(!1)}}return l.memoizedState=[a,e],a}function sc(t,e,l){return l===void 0||(ke&1073741824)!==0&&(at&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=jd(),I.lanes|=t,pl|=t,l)}function jo(t,e,l,a){return he(l,e)?l:Sa.current!==null?(t=sc(t,l,a),he(t,e)||(qt=!0),t):(ke&42)===0||(ke&1073741824)!==0&&(at&261930)===0?(qt=!0,t.memoizedState=l):(t=jd(),I.lanes|=t,pl|=t,e)}function xo(t,e,l,a,n){var u=R.p;R.p=u!==0&&8>u?u:8;var i=z.T,f={};z.T=f,rc(t,!1,e,l);try{var r=n(),b=z.S;if(b!==null&&b(f,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var A=my(r,a);cn(t,e,A,Se(t))}else cn(t,e,a,Se(t))}catch(O){cn(t,e,{then:function(){},status:"rejected",reason:O},Se())}finally{R.p=u,i!==null&&f.types!==null&&(i.types=f.types),z.T=i}}function Ey(){}function oc(t,e,l,a){if(t.tag!==5)throw Error(o(476));var n=Oo(t).queue;xo(t,n,e,X,l===null?Ey:function(){return No(t),l(a)})}function Oo(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$e,lastRenderedState:X},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$e,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function No(t){var e=Oo(t);e.next===null&&(e=t.alternate.memoizedState),cn(t,e.next.queue,{},Se())}function dc(){return Vt(An)}function Mo(){return Ct().memoizedState}function Uo(){return Ct().memoizedState}function zy(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Se();t=yl(l);var a=vl(e,t,l);a!==null&&(ce(a,e,l),en(a,e,l)),e={cache:wi()},t.payload=e;return}e=e.return}}function Ay(t,e,l){var a=Se();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},yu(t)?Co(e,l):(l=Ni(t,e,l,a),l!==null&&(ce(l,t,a),Ro(l,e,a)))}function Do(t,e,l){var a=Se();cn(t,e,l,a)}function cn(t,e,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(yu(t))Co(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var i=e.lastRenderedState,f=u(i,l);if(n.hasEagerState=!0,n.eagerState=f,he(f,i))return kn(t,e,n,0),pt===null&&Jn(),!1}catch{}finally{}if(l=Ni(t,e,n,a),l!==null)return ce(l,t,a),Ro(l,e,a),!0}return!1}function rc(t,e,l,a){if(a={lane:2,revertLane:Lc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},yu(t)){if(e)throw Error(o(479))}else e=Ni(t,l,a,2),e!==null&&ce(e,t,2)}function yu(t){var e=t.alternate;return t===I||e!==null&&e===I}function Co(t,e){pa=cu=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Ro(t,e,l){if((l&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,Yf(t,l)}}var fn={readContext:Vt,use:ou,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useLayoutEffect:Mt,useInsertionEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useSyncExternalStore:Mt,useId:Mt,useHostTransitionStatus:Mt,useFormState:Mt,useActionState:Mt,useOptimistic:Mt,useMemoCache:Mt,useCacheRefresh:Mt};fn.useEffectEvent=Mt;var Ho={readContext:Vt,use:ou,useCallback:function(t,e){return Ft().memoizedState=[t,e===void 0?null:e],t},useContext:Vt,useEffect:bo,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,ru(4194308,4,Eo.bind(null,e,t),l)},useLayoutEffect:function(t,e){return ru(4194308,4,t,e)},useInsertionEffect:function(t,e){ru(4,2,t,e)},useMemo:function(t,e){var l=Ft();e=e===void 0?null:e;var a=t();if(Vl){il(!0);try{t()}finally{il(!1)}}return l.memoizedState=[a,e],a},useReducer:function(t,e,l){var a=Ft();if(l!==void 0){var n=l(e);if(Vl){il(!0);try{l(e)}finally{il(!1)}}}else n=e;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=Ay.bind(null,I,t),[a.memoizedState,t]},useRef:function(t){var e=Ft();return t={current:t},e.memoizedState=t},useState:function(t){t=uc(t);var e=t.queue,l=Do.bind(null,I,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:fc,useDeferredValue:function(t,e){var l=Ft();return sc(l,t,e)},useTransition:function(){var t=uc(!1);return t=xo.bind(null,I,t.queue,!0,!1),Ft().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var a=I,n=Ft();if(ut){if(l===void 0)throw Error(o(407));l=l()}else{if(l=e(),pt===null)throw Error(o(349));(at&127)!==0||eo(a,e,l)}n.memoizedState=l;var u={value:l,getSnapshot:e};return n.queue=u,bo(ao.bind(null,a,u,t),[t]),a.flags|=2048,Ea(9,{destroy:void 0},lo.bind(null,a,u,l,e),null),l},useId:function(){var t=Ft(),e=pt.identifierPrefix;if(ut){var l=He,a=Re;l=(a&~(1<<32-re(a)-1)).toString(32)+l,e="_"+e+"R_"+l,l=fu++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=gy++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:dc,useFormState:ho,useActionState:ho,useOptimistic:function(t){var e=Ft();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=rc.bind(null,I,!0,l),l.dispatch=e,[t,e]},useMemoCache:lc,useCacheRefresh:function(){return Ft().memoizedState=zy.bind(null,I)},useEffectEvent:function(t){var e=Ft(),l={impl:t};return e.memoizedState=l,function(){if((rt&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},hc={readContext:Vt,use:ou,useCallback:Ao,useContext:Vt,useEffect:cc,useImperativeHandle:zo,useInsertionEffect:po,useLayoutEffect:To,useMemo:_o,useReducer:du,useRef:go,useState:function(){return du($e)},useDebugValue:fc,useDeferredValue:function(t,e){var l=Ct();return jo(l,mt.memoizedState,t,e)},useTransition:function(){var t=du($e)[0],e=Ct().memoizedState;return[typeof t=="boolean"?t:un(t),e]},useSyncExternalStore:to,useId:Mo,useHostTransitionStatus:dc,useFormState:yo,useActionState:yo,useOptimistic:function(t,e){var l=Ct();return io(l,mt,t,e)},useMemoCache:lc,useCacheRefresh:Uo};hc.useEffectEvent=So;var qo={readContext:Vt,use:ou,useCallback:Ao,useContext:Vt,useEffect:cc,useImperativeHandle:zo,useInsertionEffect:po,useLayoutEffect:To,useMemo:_o,useReducer:nc,useRef:go,useState:function(){return nc($e)},useDebugValue:fc,useDeferredValue:function(t,e){var l=Ct();return mt===null?sc(l,t,e):jo(l,mt.memoizedState,t,e)},useTransition:function(){var t=nc($e)[0],e=Ct().memoizedState;return[typeof t=="boolean"?t:un(t),e]},useSyncExternalStore:to,useId:Mo,useHostTransitionStatus:dc,useFormState:mo,useActionState:mo,useOptimistic:function(t,e){var l=Ct();return mt!==null?io(l,mt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:lc,useCacheRefresh:Uo};qo.useEffectEvent=So;function yc(t,e,l,a){e=t.memoizedState,l=l(a,e),l=l==null?e:E({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var vc={enqueueSetState:function(t,e,l){t=t._reactInternals;var a=Se(),n=yl(a);n.payload=e,l!=null&&(n.callback=l),e=vl(t,n,a),e!==null&&(ce(e,t,a),en(e,t,a))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var a=Se(),n=yl(a);n.tag=1,n.payload=e,l!=null&&(n.callback=l),e=vl(t,n,a),e!==null&&(ce(e,t,a),en(e,t,a))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=Se(),a=yl(l);a.tag=2,e!=null&&(a.callback=e),e=vl(t,a,l),e!==null&&(ce(e,t,l),en(e,t,l))}};function Bo(t,e,l,a,n,u,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(a,u,i):e.prototype&&e.prototype.isPureReactComponent?!Ja(l,a)||!Ja(n,u):!0}function Yo(t,e,l,a){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,a),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,a),e.state!==t&&vc.enqueueReplaceState(e,e.state,null)}function Jl(t,e){var l=e;if("ref"in e){l={};for(var a in e)a!=="ref"&&(l[a]=e[a])}if(t=t.defaultProps){l===e&&(l=E({},l));for(var n in t)l[n]===void 0&&(l[n]=t[n])}return l}function Go(t){Vn(t)}function wo(t){console.error(t)}function Xo(t){Vn(t)}function vu(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(a){setTimeout(function(){throw a})}}function Qo(t,e,l){try{var a=t.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function mc(t,e,l){return l=yl(l),l.tag=3,l.payload={element:null},l.callback=function(){vu(t,e)},l}function Zo(t){return t=yl(t),t.tag=3,t}function Lo(t,e,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;t.payload=function(){return n(u)},t.callback=function(){Qo(e,l,a)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(t.callback=function(){Qo(e,l,a),typeof n!="function"&&(Tl===null?Tl=new Set([this]):Tl.add(this));var f=a.stack;this.componentDidCatch(a.value,{componentStack:f!==null?f:""})})}function _y(t,e,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(e=l.alternate,e!==null&&ya(e,l,n,!0),l=ve.current,l!==null){switch(l.tag){case 31:case 13:return xe===null?xu():l.alternate===null&&Ut===0&&(Ut=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===lu?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([a]):e.add(a),Xc(t,a,n)),!1;case 22:return l.flags|=65536,a===lu?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([a]):l.add(a)),Xc(t,a,n)),!1}throw Error(o(435,l.tag))}return Xc(t,a,n),xu(),!1}if(ut)return e=ve.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=n,a!==Hi&&(t=Error(o(422),{cause:a}),Wa(ze(t,l)))):(a!==Hi&&(e=Error(o(423),{cause:a}),Wa(ze(e,l))),t=t.current.alternate,t.flags|=65536,n&=-n,t.lanes|=n,a=ze(a,l),n=mc(t.stateNode,a,n),Vi(t,n),Ut!==4&&(Ut=2)),!1;var u=Error(o(520),{cause:a});if(u=ze(u,l),mn===null?mn=[u]:mn.push(u),Ut!==4&&(Ut=2),e===null)return!0;a=ze(a,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=n&-n,l.lanes|=t,t=mc(l.stateNode,a,t),Vi(l,t),!1;case 1:if(e=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Tl===null||!Tl.has(u))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Zo(n),Lo(n,t,l,a),Vi(l,n),!1}l=l.return}while(l!==null);return!1}var gc=Error(o(461)),qt=!1;function Jt(t,e,l,a){e.child=t===null?Js(e,null,l,a):Kl(e,t.child,l,a)}function Ko(t,e,l,a,n){l=l.render;var u=e.ref;if("ref"in a){var i={};for(var f in a)f!=="ref"&&(i[f]=a[f])}else i=a;return Xl(e),a=Ii(t,e,l,i,u,n),f=Pi(),t!==null&&!qt?(tc(t,e,n),We(t,e,n)):(ut&&f&&Ci(e),e.flags|=1,Jt(t,e,a,n),e.child)}function Vo(t,e,l,a,n){if(t===null){var u=l.type;return typeof u=="function"&&!Mi(u)&&u.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=u,Jo(t,e,u,a,n)):(t=Wn(l.type,null,a,e,e.mode,n),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!_c(t,n)){var i=u.memoizedProps;if(l=l.compare,l=l!==null?l:Ja,l(i,a)&&t.ref===e.ref)return We(t,e,n)}return e.flags|=1,t=Le(u,a),t.ref=e.ref,t.return=e,e.child=t}function Jo(t,e,l,a,n){if(t!==null){var u=t.memoizedProps;if(Ja(u,a)&&t.ref===e.ref)if(qt=!1,e.pendingProps=a=u,_c(t,n))(t.flags&131072)!==0&&(qt=!0);else return e.lanes=t.lanes,We(t,e,n)}return bc(t,e,l,a,n)}function ko(t,e,l,a){var n=a.children,u=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((e.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,t!==null){for(a=e.child=t.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~u}else a=0,e.child=null;return $o(t,e,u,l,a)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&tu(e,u!==null?u.cachePool:null),u!==null?Ws(e,u):ki(),Fs(e);else return a=e.lanes=536870912,$o(t,e,u!==null?u.baseLanes|l:l,l,a)}else u!==null?(tu(e,u.cachePool),Ws(e,u),gl(),e.memoizedState=null):(t!==null&&tu(e,null),ki(),gl());return Jt(t,e,n,l),e.child}function sn(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function $o(t,e,l,a,n){var u=Qi();return u=u===null?null:{parent:Rt._currentValue,pool:u},e.memoizedState={baseLanes:l,cachePool:u},t!==null&&tu(e,null),ki(),Fs(e),t!==null&&ya(t,e,a,!0),e.childLanes=n,null}function mu(t,e){return e=bu({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Wo(t,e,l){return Kl(e,t.child,null,l),t=mu(e,e.pendingProps),t.flags|=2,me(e),e.memoizedState=null,t}function jy(t,e,l){var a=e.pendingProps,n=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(ut){if(a.mode==="hidden")return t=mu(e,a),e.lanes=536870912,sn(null,t);if(Wi(e),(t=At)?(t=fr(t,je),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:sl!==null?{id:Re,overflow:He}:null,retryLane:536870912,hydrationErrors:null},l=Ds(t),l.return=e,e.child=l,Kt=e,At=null)):t=null,t===null)throw dl(e);return e.lanes=536870912,null}return mu(e,a)}var u=t.memoizedState;if(u!==null){var i=u.dehydrated;if(Wi(e),n)if(e.flags&256)e.flags&=-257,e=Wo(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(o(558));else if(qt||ya(t,e,l,!1),n=(l&t.childLanes)!==0,qt||n){if(a=pt,a!==null&&(i=Gf(a,l),i!==0&&i!==u.retryLane))throw u.retryLane=i,Bl(t,i),ce(a,t,i),gc;xu(),e=Wo(t,e,l)}else t=u.treeContext,At=Oe(i.nextSibling),Kt=e,ut=!0,ol=null,je=!1,t!==null&&Hs(e,t),e=mu(e,a),e.flags|=4096;return e}return t=Le(t.child,{mode:a.mode,children:a.children}),t.ref=e.ref,e.child=t,t.return=e,t}function gu(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function bc(t,e,l,a,n){return Xl(e),l=Ii(t,e,l,a,void 0,n),a=Pi(),t!==null&&!qt?(tc(t,e,n),We(t,e,n)):(ut&&a&&Ci(e),e.flags|=1,Jt(t,e,l,n),e.child)}function Fo(t,e,l,a,n,u){return Xl(e),e.updateQueue=null,l=Ps(e,a,l,n),Is(t),a=Pi(),t!==null&&!qt?(tc(t,e,u),We(t,e,u)):(ut&&a&&Ci(e),e.flags|=1,Jt(t,e,l,u),e.child)}function Io(t,e,l,a,n){if(Xl(e),e.stateNode===null){var u=oa,i=l.contextType;typeof i=="object"&&i!==null&&(u=Vt(i)),u=new l(a,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=vc,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=a,u.state=e.memoizedState,u.refs={},Li(e),i=l.contextType,u.context=typeof i=="object"&&i!==null?Vt(i):oa,u.state=e.memoizedState,i=l.getDerivedStateFromProps,typeof i=="function"&&(yc(e,l,i,a),u.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(i=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),i!==u.state&&vc.enqueueReplaceState(u,u.state,null),an(e,a,u,n),ln(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),a=!0}else if(t===null){u=e.stateNode;var f=e.memoizedProps,r=Jl(l,f);u.props=r;var b=u.context,A=l.contextType;i=oa,typeof A=="object"&&A!==null&&(i=Vt(A));var O=l.getDerivedStateFromProps;A=typeof O=="function"||typeof u.getSnapshotBeforeUpdate=="function",f=e.pendingProps!==f,A||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f||b!==i)&&Yo(e,u,a,i),hl=!1;var p=e.memoizedState;u.state=p,an(e,a,u,n),ln(),b=e.memoizedState,f||p!==b||hl?(typeof O=="function"&&(yc(e,l,O,a),b=e.memoizedState),(r=hl||Bo(e,l,r,a,p,b,i))?(A||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=a,e.memoizedState=b),u.props=a,u.state=b,u.context=i,a=r):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),a=!1)}else{u=e.stateNode,Ki(t,e),i=e.memoizedProps,A=Jl(l,i),u.props=A,O=e.pendingProps,p=u.context,b=l.contextType,r=oa,typeof b=="object"&&b!==null&&(r=Vt(b)),f=l.getDerivedStateFromProps,(b=typeof f=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==O||p!==r)&&Yo(e,u,a,r),hl=!1,p=e.memoizedState,u.state=p,an(e,a,u,n),ln();var T=e.memoizedState;i!==O||p!==T||hl||t!==null&&t.dependencies!==null&&In(t.dependencies)?(typeof f=="function"&&(yc(e,l,f,a),T=e.memoizedState),(A=hl||Bo(e,l,A,a,p,T,r)||t!==null&&t.dependencies!==null&&In(t.dependencies))?(b||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,T,r),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,T,r)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=a,e.memoizedState=T),u.props=a,u.state=T,u.context=r,a=A):(typeof u.componentDidUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),a=!1)}return u=a,gu(t,e),a=(e.flags&128)!==0,u||a?(u=e.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&a?(e.child=Kl(e,t.child,null,n),e.child=Kl(e,null,l,n)):Jt(t,e,l,n),e.memoizedState=u.state,t=e.child):t=We(t,e,n),t}function Po(t,e,l,a){return Gl(),e.flags|=256,Jt(t,e,l,a),e.child}var Sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(t){return{baseLanes:t,cachePool:Xs()}}function Tc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=be),t}function td(t,e,l){var a=e.pendingProps,n=!1,u=(e.flags&128)!==0,i;if((i=u)||(i=t!==null&&t.memoizedState===null?!1:(Dt.current&2)!==0),i&&(n=!0,e.flags&=-129),i=(e.flags&32)!==0,e.flags&=-33,t===null){if(ut){if(n?ml(e):gl(),(t=At)?(t=fr(t,je),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:sl!==null?{id:Re,overflow:He}:null,retryLane:536870912,hydrationErrors:null},l=Ds(t),l.return=e,e.child=l,Kt=e,At=null)):t=null,t===null)throw dl(e);return af(t)?e.lanes=32:e.lanes=536870912,null}var f=a.children;return a=a.fallback,n?(gl(),n=e.mode,f=bu({mode:"hidden",children:f},n),a=Yl(a,n,l,null),f.return=e,a.return=e,f.sibling=a,e.child=f,a=e.child,a.memoizedState=pc(l),a.childLanes=Tc(t,i,l),e.memoizedState=Sc,sn(null,a)):(ml(e),Ec(e,f))}var r=t.memoizedState;if(r!==null&&(f=r.dehydrated,f!==null)){if(u)e.flags&256?(ml(e),e.flags&=-257,e=zc(t,e,l)):e.memoizedState!==null?(gl(),e.child=t.child,e.flags|=128,e=null):(gl(),f=a.fallback,n=e.mode,a=bu({mode:"visible",children:a.children},n),f=Yl(f,n,l,null),f.flags|=2,a.return=e,f.return=e,a.sibling=f,e.child=a,Kl(e,t.child,null,l),a=e.child,a.memoizedState=pc(l),a.childLanes=Tc(t,i,l),e.memoizedState=Sc,e=sn(null,a));else if(ml(e),af(f)){if(i=f.nextSibling&&f.nextSibling.dataset,i)var b=i.dgst;i=b,a=Error(o(419)),a.stack="",a.digest=i,Wa({value:a,source:null,stack:null}),e=zc(t,e,l)}else if(qt||ya(t,e,l,!1),i=(l&t.childLanes)!==0,qt||i){if(i=pt,i!==null&&(a=Gf(i,l),a!==0&&a!==r.retryLane))throw r.retryLane=a,Bl(t,a),ce(i,t,a),gc;lf(f)||xu(),e=zc(t,e,l)}else lf(f)?(e.flags|=192,e.child=t.child,e=null):(t=r.treeContext,At=Oe(f.nextSibling),Kt=e,ut=!0,ol=null,je=!1,t!==null&&Hs(e,t),e=Ec(e,a.children),e.flags|=4096);return e}return n?(gl(),f=a.fallback,n=e.mode,r=t.child,b=r.sibling,a=Le(r,{mode:"hidden",children:a.children}),a.subtreeFlags=r.subtreeFlags&65011712,b!==null?f=Le(b,f):(f=Yl(f,n,l,null),f.flags|=2),f.return=e,a.return=e,a.sibling=f,e.child=a,sn(null,a),a=e.child,f=t.child.memoizedState,f===null?f=pc(l):(n=f.cachePool,n!==null?(r=Rt._currentValue,n=n.parent!==r?{parent:r,pool:r}:n):n=Xs(),f={baseLanes:f.baseLanes|l,cachePool:n}),a.memoizedState=f,a.childLanes=Tc(t,i,l),e.memoizedState=Sc,sn(t.child,a)):(ml(e),l=t.child,t=l.sibling,l=Le(l,{mode:"visible",children:a.children}),l.return=e,l.sibling=null,t!==null&&(i=e.deletions,i===null?(e.deletions=[t],e.flags|=16):i.push(t)),e.child=l,e.memoizedState=null,l)}function Ec(t,e){return e=bu({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function bu(t,e){return t=ye(22,t,null,e),t.lanes=0,t}function zc(t,e,l){return Kl(e,t.child,null,l),t=Ec(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function ed(t,e,l){t.lanes|=e;var a=t.alternate;a!==null&&(a.lanes|=e),Yi(t.return,e,l)}function Ac(t,e,l,a,n,u){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:u}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=l,i.tailMode=n,i.treeForkCount=u)}function ld(t,e,l){var a=e.pendingProps,n=a.revealOrder,u=a.tail;a=a.children;var i=Dt.current,f=(i&2)!==0;if(f?(i=i&1|2,e.flags|=128):i&=1,H(Dt,i),Jt(t,e,a,l),a=ut?$a:0,!f&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ed(t,l,e);else if(t.tag===19)ed(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(n){case"forwards":for(l=e.child,n=null;l!==null;)t=l.alternate,t!==null&&iu(t)===null&&(n=l),l=l.sibling;l=n,l===null?(n=e.child,e.child=null):(n=l.sibling,l.sibling=null),Ac(e,!1,n,l,u,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=e.child,e.child=null;n!==null;){if(t=n.alternate,t!==null&&iu(t)===null){e.child=n;break}t=n.sibling,n.sibling=l,l=n,n=t}Ac(e,!0,l,null,u,a);break;case"together":Ac(e,!1,null,null,void 0,a);break;default:e.memoizedState=null}return e.child}function We(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),pl|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(ya(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(o(153));if(e.child!==null){for(t=e.child,l=Le(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=Le(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function _c(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&In(t)))}function xy(t,e,l){switch(e.tag){case 3:Zt(e,e.stateNode.containerInfo),rl(e,Rt,t.memoizedState.cache),Gl();break;case 27:case 5:Ul(e);break;case 4:Zt(e,e.stateNode.containerInfo);break;case 10:rl(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Wi(e),null;break;case 13:var a=e.memoizedState;if(a!==null)return a.dehydrated!==null?(ml(e),e.flags|=128,null):(l&e.child.childLanes)!==0?td(t,e,l):(ml(e),t=We(t,e,l),t!==null?t.sibling:null);ml(e);break;case 19:var n=(t.flags&128)!==0;if(a=(l&e.childLanes)!==0,a||(ya(t,e,l,!1),a=(l&e.childLanes)!==0),n){if(a)return ld(t,e,l);e.flags|=128}if(n=e.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),H(Dt,Dt.current),a)break;return null;case 22:return e.lanes=0,ko(t,e,l,e.pendingProps);case 24:rl(e,Rt,t.memoizedState.cache)}return We(t,e,l)}function ad(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)qt=!0;else{if(!_c(t,l)&&(e.flags&128)===0)return qt=!1,xy(t,e,l);qt=(t.flags&131072)!==0}else qt=!1,ut&&(e.flags&1048576)!==0&&Rs(e,$a,e.index);switch(e.lanes=0,e.tag){case 16:t:{var a=e.pendingProps;if(t=Zl(e.elementType),e.type=t,typeof t=="function")Mi(t)?(a=Jl(t,a),e.tag=1,e=Io(null,e,t,a,l)):(e.tag=0,e=bc(null,e,t,a,l));else{if(t!=null){var n=t.$$typeof;if(n===Nt){e.tag=11,e=Ko(null,e,t,a,l);break t}else if(n===F){e.tag=14,e=Vo(null,e,t,a,l);break t}}throw e=Me(t)||t,Error(o(306,e,""))}}return e;case 0:return bc(t,e,e.type,e.pendingProps,l);case 1:return a=e.type,n=Jl(a,e.pendingProps),Io(t,e,a,n,l);case 3:t:{if(Zt(e,e.stateNode.containerInfo),t===null)throw Error(o(387));a=e.pendingProps;var u=e.memoizedState;n=u.element,Ki(t,e),an(e,a,null,l);var i=e.memoizedState;if(a=i.cache,rl(e,Rt,a),a!==u.cache&&Gi(e,[Rt],l,!0),ln(),a=i.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:i.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=Po(t,e,a,l);break t}else if(a!==n){n=ze(Error(o(424)),e),Wa(n),e=Po(t,e,a,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(At=Oe(t.firstChild),Kt=e,ut=!0,ol=null,je=!0,l=Js(e,null,a,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Gl(),a===n){e=We(t,e,l);break t}Jt(t,e,a,l)}e=e.child}return e;case 26:return gu(t,e),t===null?(l=yr(e.type,null,e.pendingProps,null))?e.memoizedState=l:ut||(l=e.type,t=e.pendingProps,a=Ru(tt.current).createElement(l),a[Lt]=e,a[ee]=t,kt(a,l,t),Xt(a),e.stateNode=a):e.memoizedState=yr(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Ul(e),t===null&&ut&&(a=e.stateNode=dr(e.type,e.pendingProps,tt.current),Kt=e,je=!0,n=At,_l(e.type)?(nf=n,At=Oe(a.firstChild)):At=n),Jt(t,e,e.pendingProps.children,l),gu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ut&&((n=a=At)&&(a=av(a,e.type,e.pendingProps,je),a!==null?(e.stateNode=a,Kt=e,At=Oe(a.firstChild),je=!1,n=!0):n=!1),n||dl(e)),Ul(e),n=e.type,u=e.pendingProps,i=t!==null?t.memoizedProps:null,a=u.children,Pc(n,u)?a=null:i!==null&&Pc(n,i)&&(e.flags|=32),e.memoizedState!==null&&(n=Ii(t,e,by,null,null,l),An._currentValue=n),gu(t,e),Jt(t,e,a,l),e.child;case 6:return t===null&&ut&&((t=l=At)&&(l=nv(l,e.pendingProps,je),l!==null?(e.stateNode=l,Kt=e,At=null,t=!0):t=!1),t||dl(e)),null;case 13:return td(t,e,l);case 4:return Zt(e,e.stateNode.containerInfo),a=e.pendingProps,t===null?e.child=Kl(e,null,a,l):Jt(t,e,a,l),e.child;case 11:return Ko(t,e,e.type,e.pendingProps,l);case 7:return Jt(t,e,e.pendingProps,l),e.child;case 8:return Jt(t,e,e.pendingProps.children,l),e.child;case 12:return Jt(t,e,e.pendingProps.children,l),e.child;case 10:return a=e.pendingProps,rl(e,e.type,a.value),Jt(t,e,a.children,l),e.child;case 9:return n=e.type._context,a=e.pendingProps.children,Xl(e),n=Vt(n),a=a(n),e.flags|=1,Jt(t,e,a,l),e.child;case 14:return Vo(t,e,e.type,e.pendingProps,l);case 15:return Jo(t,e,e.type,e.pendingProps,l);case 19:return ld(t,e,l);case 31:return jy(t,e,l);case 22:return ko(t,e,l,e.pendingProps);case 24:return Xl(e),a=Vt(Rt),t===null?(n=Qi(),n===null&&(n=pt,u=wi(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=l),n=u),e.memoizedState={parent:a,cache:n},Li(e),rl(e,Rt,n)):((t.lanes&l)!==0&&(Ki(t,e),an(e,null,null,l),ln()),n=t.memoizedState,u=e.memoizedState,n.parent!==a?(n={parent:a,cache:a},e.memoizedState=n,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=n),rl(e,Rt,a)):(a=u.cache,rl(e,Rt,a),a!==n.cache&&Gi(e,[Rt],l,!0))),Jt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(o(156,e.tag))}function Fe(t){t.flags|=4}function jc(t,e,l,a,n){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(n&335544128)===n)if(t.stateNode.complete)t.flags|=8192;else if(Md())t.flags|=8192;else throw Ll=lu,Zi}else t.flags&=-16777217}function nd(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Sr(e))if(Md())t.flags|=8192;else throw Ll=lu,Zi}function Su(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?qf():536870912,t.lanes|=e,ja|=e)}function on(t,e){if(!ut)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:a.sibling=null}}function _t(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,a=0;if(e)for(var n=t.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=t,n=n.sibling;else for(n=t.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=t,n=n.sibling;return t.subtreeFlags|=a,t.childLanes=l,e}function Oy(t,e,l){var a=e.pendingProps;switch(Ri(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(e),null;case 1:return _t(e),null;case 3:return l=e.stateNode,a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Je(Rt),Et(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ha(e)?Fe(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,qi())),_t(e),null;case 26:var n=e.type,u=e.memoizedState;return t===null?(Fe(e),u!==null?(_t(e),nd(e,u)):(_t(e),jc(e,n,null,a,l))):u?u!==t.memoizedState?(Fe(e),_t(e),nd(e,u)):(_t(e),e.flags&=-16777217):(t=t.memoizedProps,t!==a&&Fe(e),_t(e),jc(e,n,t,a,l)),null;case 27:if(B(e),l=tt.current,n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==a&&Fe(e);else{if(!a){if(e.stateNode===null)throw Error(o(166));return _t(e),null}t=G.current,ha(e)?qs(e):(t=dr(n,a,l),e.stateNode=t,Fe(e))}return _t(e),null;case 5:if(B(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==a&&Fe(e);else{if(!a){if(e.stateNode===null)throw Error(o(166));return _t(e),null}if(u=G.current,ha(e))qs(e);else{var i=Ru(tt.current);switch(u){case 1:u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=i.createElement("div"),u.innerHTML="<script><\\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[Lt]=e,u[ee]=a;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=u;t:switch(kt(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&Fe(e)}}return _t(e),jc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&Fe(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(o(166));if(t=tt.current,ha(e)){if(t=e.stateNode,l=e.memoizedProps,a=null,n=Kt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[Lt]=e,t=!!(t.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||tr(t.nodeValue,l)),t||dl(e,!0)}else t=Ru(t).createTextNode(a),t[Lt]=e,e.stateNode=t}return _t(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(a=ha(e),l!==null){if(t===null){if(!a)throw Error(o(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Lt]=e}else Gl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),t=!1}else l=qi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(me(e),e):(me(e),null);if((e.flags&128)!==0)throw Error(o(558))}return _t(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=ha(e),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(o(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[Lt]=e}else Gl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),n=!1}else n=qi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?(me(e),e):(me(e),null)}return me(e),(e.flags&128)!==0?(e.lanes=l,e):(l=a!==null,t=t!==null&&t.memoizedState!==null,l&&(a=e.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Su(e,e.updateQueue),_t(e),null);case 4:return Et(),t===null&&kc(e.stateNode.containerInfo),_t(e),null;case 10:return Je(e.type),_t(e),null;case 19:if(N(Dt),a=e.memoizedState,a===null)return _t(e),null;if(n=(e.flags&128)!==0,u=a.rendering,u===null)if(n)on(a,!1);else{if(Ut!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=iu(t),u!==null){for(e.flags|=128,on(a,!1),t=u.updateQueue,e.updateQueue=t,Su(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Us(l,t),l=l.sibling;return H(Dt,Dt.current&1|2),ut&&Ke(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&oe()>Au&&(e.flags|=128,n=!0,on(a,!1),e.lanes=4194304)}else{if(!n)if(t=iu(u),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,Su(e,t),on(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ut)return _t(e),null}else 2*oe()-a.renderingStartTime>Au&&l!==536870912&&(e.flags|=128,n=!0,on(a,!1),e.lanes=4194304);a.isBackwards?(u.sibling=e.child,e.child=u):(t=a.last,t!==null?t.sibling=u:e.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=oe(),t.sibling=null,l=Dt.current,H(Dt,n?l&1|2:l&1),ut&&Ke(e,a.treeForkCount),t):(_t(e),null);case 22:case 23:return me(e),$i(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(l&536870912)!==0&&(e.flags&128)===0&&(_t(e),e.subtreeFlags&6&&(e.flags|=8192)):_t(e),l=e.updateQueue,l!==null&&Su(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==l&&(e.flags|=2048),t!==null&&N(Ql),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Je(Rt),_t(e),null;case 25:return null;case 30:return null}throw Error(o(156,e.tag))}function Ny(t,e){switch(Ri(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Je(Rt),Et(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return B(e),null;case 31:if(e.memoizedState!==null){if(me(e),e.alternate===null)throw Error(o(340));Gl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(me(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));Gl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return N(Dt),null;case 4:return Et(),null;case 10:return Je(e.type),null;case 22:case 23:return me(e),$i(),t!==null&&N(Ql),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Je(Rt),null;case 25:return null;default:return null}}function ud(t,e){switch(Ri(e),e.tag){case 3:Je(Rt),Et();break;case 26:case 27:case 5:B(e);break;case 4:Et();break;case 31:e.memoizedState!==null&&me(e);break;case 13:me(e);break;case 19:N(Dt);break;case 10:Je(e.type);break;case 22:case 23:me(e),$i(),t!==null&&N(Ql);break;case 24:Je(Rt)}}function dn(t,e){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&t)===t){a=void 0;var u=l.create,i=l.inst;a=u(),i.destroy=a}l=l.next}while(l!==n)}}catch(f){yt(e,e.return,f)}}function bl(t,e,l){try{var a=e.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&t)===t){var i=a.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,n=e;var r=l,b=f;try{b()}catch(A){yt(n,r,A)}}}a=a.next}while(a!==u)}}catch(A){yt(e,e.return,A)}}function id(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{$s(e,l)}catch(a){yt(t,t.return,a)}}}function cd(t,e,l){l.props=Jl(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(a){yt(t,e,a)}}function rn(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof l=="function"?t.refCleanup=l(a):l.current=a}}catch(n){yt(t,e,n)}}function qe(t,e){var l=t.ref,a=t.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){yt(t,e,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){yt(t,e,n)}else l.current=null}function fd(t){var e=t.type,l=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break t;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){yt(t,t.return,n)}}function xc(t,e,l){try{var a=t.stateNode;Fy(a,t.type,l,e),a[ee]=e}catch(n){yt(t,t.return,n)}}function sd(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&_l(t.type)||t.tag===4}function Oc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||sd(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&_l(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Nc(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Qe));else if(a!==4&&(a===27&&_l(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Nc(t,e,l),t=t.sibling;t!==null;)Nc(t,e,l),t=t.sibling}function pu(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(a!==4&&(a===27&&_l(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(pu(t,e,l),t=t.sibling;t!==null;)pu(t,e,l),t=t.sibling}function od(t){var e=t.stateNode,l=t.memoizedProps;try{for(var a=t.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);kt(e,a,l),e[Lt]=t,e[ee]=l}catch(u){yt(t,t.return,u)}}var Ie=!1,Bt=!1,Mc=!1,dd=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function My(t,e){if(t=t.containerInfo,Fc=Xu,t=Es(t),zi(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break t}var i=0,f=-1,r=-1,b=0,A=0,O=t,p=null;e:for(;;){for(var T;O!==l||n!==0&&O.nodeType!==3||(f=i+n),O!==u||a!==0&&O.nodeType!==3||(r=i+a),O.nodeType===3&&(i+=O.nodeValue.length),(T=O.firstChild)!==null;)p=O,O=T;for(;;){if(O===t)break e;if(p===l&&++b===n&&(f=i),p===u&&++A===a&&(r=i),(T=O.nextSibling)!==null)break;O=p,p=O.parentNode}O=T}l=f===-1||r===-1?null:{start:f,end:r}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ic={focusedElem:t,selectionRange:l},Xu=!1,Qt=e;Qt!==null;)if(e=Qt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Qt=t;else for(;Qt!==null;){switch(e=Qt,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)n=t[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&u!==null){t=void 0,l=e,n=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var Y=Jl(l.type,n);t=a.getSnapshotBeforeUpdate(Y,u),a.__reactInternalSnapshotBeforeUpdate=t}catch(Z){yt(l,l.return,Z)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)ef(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":ef(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=e.sibling,t!==null){t.return=e.return,Qt=t;break}Qt=e.return}}function rd(t,e,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:tl(t,l),a&4&&dn(5,l);break;case 1:if(tl(t,l),a&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(i){yt(l,l.return,i)}else{var n=Jl(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(n,e,t.__reactInternalSnapshotBeforeUpdate)}catch(i){yt(l,l.return,i)}}a&64&&id(l),a&512&&rn(l,l.return);break;case 3:if(tl(t,l),a&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{$s(t,e)}catch(i){yt(l,l.return,i)}}break;case 27:e===null&&a&4&&od(l);case 26:case 5:tl(t,l),e===null&&a&4&&fd(l),a&512&&rn(l,l.return);break;case 12:tl(t,l);break;case 31:tl(t,l),a&4&&vd(t,l);break;case 13:tl(t,l),a&4&&md(t,l),a&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Gy.bind(null,l),uv(t,l))));break;case 22:if(a=l.memoizedState!==null||Ie,!a){e=e!==null&&e.memoizedState!==null||Bt,n=Ie;var u=Bt;Ie=a,(Bt=e)&&!u?el(t,l,(l.subtreeFlags&8772)!==0):tl(t,l),Ie=n,Bt=u}break;case 30:break;default:tl(t,l)}}function hd(t){var e=t.alternate;e!==null&&(t.alternate=null,hd(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&ii(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var jt=null,ae=!1;function Pe(t,e,l){for(l=l.child;l!==null;)yd(t,e,l),l=l.sibling}function yd(t,e,l){if(de&&typeof de.onCommitFiberUnmount=="function")try{de.onCommitFiberUnmount(Ha,l)}catch{}switch(l.tag){case 26:Bt||qe(l,e),Pe(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Bt||qe(l,e);var a=jt,n=ae;_l(l.type)&&(jt=l.stateNode,ae=!1),Pe(t,e,l),Tn(l.stateNode),jt=a,ae=n;break;case 5:Bt||qe(l,e);case 6:if(a=jt,n=ae,jt=null,Pe(t,e,l),jt=a,ae=n,jt!==null)if(ae)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(l.stateNode)}catch(u){yt(l,e,u)}else try{jt.removeChild(l.stateNode)}catch(u){yt(l,e,u)}break;case 18:jt!==null&&(ae?(t=jt,ir(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Ra(t)):ir(jt,l.stateNode));break;case 4:a=jt,n=ae,jt=l.stateNode.containerInfo,ae=!0,Pe(t,e,l),jt=a,ae=n;break;case 0:case 11:case 14:case 15:bl(2,l,e),Bt||bl(4,l,e),Pe(t,e,l);break;case 1:Bt||(qe(l,e),a=l.stateNode,typeof a.componentWillUnmount=="function"&&cd(l,e,a)),Pe(t,e,l);break;case 21:Pe(t,e,l);break;case 22:Bt=(a=Bt)||l.memoizedState!==null,Pe(t,e,l),Bt=a;break;default:Pe(t,e,l)}}function vd(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ra(t)}catch(l){yt(e,e.return,l)}}}function md(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ra(t)}catch(l){yt(e,e.return,l)}}function Uy(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new dd),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new dd),e;default:throw Error(o(435,t.tag))}}function Tu(t,e){var l=Uy(t);e.forEach(function(a){if(!l.has(a)){l.add(a);var n=wy.bind(null,t,a);a.then(n,n)}})}function ne(t,e){var l=e.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],u=t,i=e,f=i;t:for(;f!==null;){switch(f.tag){case 27:if(_l(f.type)){jt=f.stateNode,ae=!1;break t}break;case 5:jt=f.stateNode,ae=!1;break t;case 3:case 4:jt=f.stateNode.containerInfo,ae=!0;break t}f=f.return}if(jt===null)throw Error(o(160));yd(u,i,n),jt=null,ae=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)gd(e,t),e=e.sibling}var De=null;function gd(t,e){var l=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ne(e,t),ue(t),a&4&&(bl(3,t,t.return),dn(3,t),bl(5,t,t.return));break;case 1:ne(e,t),ue(t),a&512&&(Bt||l===null||qe(l,l.return)),a&64&&Ie&&(t=t.updateQueue,t!==null&&(a=t.callbacks,a!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=De;if(ne(e,t),ue(t),a&512&&(Bt||l===null||qe(l,l.return)),a&4){var u=l!==null?l.memoizedState:null;if(a=t.memoizedState,l===null)if(a===null)if(t.stateNode===null){t:{a=t.type,l=t.memoizedProps,n=n.ownerDocument||n;e:switch(a){case"title":u=n.getElementsByTagName("title")[0],(!u||u[Ya]||u[Lt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector("head > title"))),kt(u,a,l),u[Lt]=t,Xt(u),a=u;break t;case"link":var i=gr("link","href",n).get(a+(l.href||""));if(i){for(var f=0;f<i.length;f++)if(u=i[f],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(f,1);break e}}u=n.createElement(a),kt(u,a,l),n.head.appendChild(u);break;case"meta":if(i=gr("meta","content",n).get(a+(l.content||""))){for(f=0;f<i.length;f++)if(u=i[f],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(f,1);break e}}u=n.createElement(a),kt(u,a,l),n.head.appendChild(u);break;default:throw Error(o(468,a))}u[Lt]=t,Xt(u),a=u}t.stateNode=a}else br(n,t.type,t.stateNode);else t.stateNode=mr(n,a,t.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?br(n,t.type,t.stateNode):mr(n,a,t.memoizedProps)):a===null&&t.stateNode!==null&&xc(t,t.memoizedProps,l.memoizedProps)}break;case 27:ne(e,t),ue(t),a&512&&(Bt||l===null||qe(l,l.return)),l!==null&&a&4&&xc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(ne(e,t),ue(t),a&512&&(Bt||l===null||qe(l,l.return)),t.flags&32){n=t.stateNode;try{aa(n,"")}catch(Y){yt(t,t.return,Y)}}a&4&&t.stateNode!=null&&(n=t.memoizedProps,xc(t,n,l!==null?l.memoizedProps:n)),a&1024&&(Mc=!0);break;case 6:if(ne(e,t),ue(t),a&4){if(t.stateNode===null)throw Error(o(162));a=t.memoizedProps,l=t.stateNode;try{l.nodeValue=a}catch(Y){yt(t,t.return,Y)}}break;case 3:if(Bu=null,n=De,De=Hu(e.containerInfo),ne(e,t),De=n,ue(t),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ra(e.containerInfo)}catch(Y){yt(t,t.return,Y)}Mc&&(Mc=!1,bd(t));break;case 4:a=De,De=Hu(t.stateNode.containerInfo),ne(e,t),ue(t),De=a;break;case 12:ne(e,t),ue(t);break;case 31:ne(e,t),ue(t),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Tu(t,a)));break;case 13:ne(e,t),ue(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(zu=oe()),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Tu(t,a)));break;case 22:n=t.memoizedState!==null;var r=l!==null&&l.memoizedState!==null,b=Ie,A=Bt;if(Ie=b||n,Bt=A||r,ne(e,t),Bt=A,Ie=b,ue(t),a&8192)t:for(e=t.stateNode,e._visibility=n?e._visibility&-2:e._visibility|1,n&&(l===null||r||Ie||Bt||kl(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){r=l=e;try{if(u=r.stateNode,n)i=u.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{f=r.stateNode;var O=r.memoizedProps.style,p=O!=null&&O.hasOwnProperty("display")?O.display:null;f.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(Y){yt(r,r.return,Y)}}}else if(e.tag===6){if(l===null){r=e;try{r.stateNode.nodeValue=n?"":r.memoizedProps}catch(Y){yt(r,r.return,Y)}}}else if(e.tag===18){if(l===null){r=e;try{var T=r.stateNode;n?cr(T,!0):cr(r.stateNode,!1)}catch(Y){yt(r,r.return,Y)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}a&4&&(a=t.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Tu(t,l))));break;case 19:ne(e,t),ue(t),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Tu(t,a)));break;case 30:break;case 21:break;default:ne(e,t),ue(t)}}function ue(t){var e=t.flags;if(e&2){try{for(var l,a=t.return;a!==null;){if(sd(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var n=l.stateNode,u=Oc(t);pu(t,u,n);break;case 5:var i=l.stateNode;l.flags&32&&(aa(i,""),l.flags&=-33);var f=Oc(t);pu(t,f,i);break;case 3:case 4:var r=l.stateNode.containerInfo,b=Oc(t);Nc(t,b,r);break;default:throw Error(o(161))}}catch(A){yt(t,t.return,A)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function bd(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;bd(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function tl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)rd(t,e.alternate,e),e=e.sibling}function kl(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:bl(4,e,e.return),kl(e);break;case 1:qe(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&cd(e,e.return,l),kl(e);break;case 27:Tn(e.stateNode);case 26:case 5:qe(e,e.return),kl(e);break;case 22:e.memoizedState===null&&kl(e);break;case 30:kl(e);break;default:kl(e)}t=t.sibling}}function el(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var a=e.alternate,n=t,u=e,i=u.flags;switch(u.tag){case 0:case 11:case 15:el(n,u,l),dn(4,u);break;case 1:if(el(n,u,l),a=u,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(b){yt(a,a.return,b)}if(a=u,n=a.updateQueue,n!==null){var f=a.stateNode;try{var r=n.shared.hiddenCallbacks;if(r!==null)for(n.shared.hiddenCallbacks=null,n=0;n<r.length;n++)ks(r[n],f)}catch(b){yt(a,a.return,b)}}l&&i&64&&id(u),rn(u,u.return);break;case 27:od(u);case 26:case 5:el(n,u,l),l&&a===null&&i&4&&fd(u),rn(u,u.return);break;case 12:el(n,u,l);break;case 31:el(n,u,l),l&&i&4&&vd(n,u);break;case 13:el(n,u,l),l&&i&4&&md(n,u);break;case 22:u.memoizedState===null&&el(n,u,l),rn(u,u.return);break;case 30:break;default:el(n,u,l)}e=e.sibling}}function Uc(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Fa(l))}function Dc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Fa(t))}function Ce(t,e,l,a){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sd(t,e,l,a),e=e.sibling}function Sd(t,e,l,a){var n=e.flags;switch(e.tag){case 0:case 11:case 15:Ce(t,e,l,a),n&2048&&dn(9,e);break;case 1:Ce(t,e,l,a);break;case 3:Ce(t,e,l,a),n&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Fa(t)));break;case 12:if(n&2048){Ce(t,e,l,a),t=e.stateNode;try{var u=e.memoizedProps,i=u.id,f=u.onPostCommit;typeof f=="function"&&f(i,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(r){yt(e,e.return,r)}}else Ce(t,e,l,a);break;case 31:Ce(t,e,l,a);break;case 13:Ce(t,e,l,a);break;case 23:break;case 22:u=e.stateNode,i=e.alternate,e.memoizedState!==null?u._visibility&2?Ce(t,e,l,a):hn(t,e):u._visibility&2?Ce(t,e,l,a):(u._visibility|=2,za(t,e,l,a,(e.subtreeFlags&10256)!==0||!1)),n&2048&&Uc(i,e);break;case 24:Ce(t,e,l,a),n&2048&&Dc(e.alternate,e);break;default:Ce(t,e,l,a)}}function za(t,e,l,a,n){for(n=n&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var u=t,i=e,f=l,r=a,b=i.flags;switch(i.tag){case 0:case 11:case 15:za(u,i,f,r,n),dn(8,i);break;case 23:break;case 22:var A=i.stateNode;i.memoizedState!==null?A._visibility&2?za(u,i,f,r,n):hn(u,i):(A._visibility|=2,za(u,i,f,r,n)),n&&b&2048&&Uc(i.alternate,i);break;case 24:za(u,i,f,r,n),n&&b&2048&&Dc(i.alternate,i);break;default:za(u,i,f,r,n)}e=e.sibling}}function hn(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,a=e,n=a.flags;switch(a.tag){case 22:hn(l,a),n&2048&&Uc(a.alternate,a);break;case 24:hn(l,a),n&2048&&Dc(a.alternate,a);break;default:hn(l,a)}e=e.sibling}}var yn=8192;function Aa(t,e,l){if(t.subtreeFlags&yn)for(t=t.child;t!==null;)pd(t,e,l),t=t.sibling}function pd(t,e,l){switch(t.tag){case 26:Aa(t,e,l),t.flags&yn&&t.memoizedState!==null&&gv(l,De,t.memoizedState,t.memoizedProps);break;case 5:Aa(t,e,l);break;case 3:case 4:var a=De;De=Hu(t.stateNode.containerInfo),Aa(t,e,l),De=a;break;case 22:t.memoizedState===null&&(a=t.alternate,a!==null&&a.memoizedState!==null?(a=yn,yn=16777216,Aa(t,e,l),yn=a):Aa(t,e,l));break;default:Aa(t,e,l)}}function Td(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function vn(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var a=e[l];Qt=a,zd(a,t)}Td(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ed(t),t=t.sibling}function Ed(t){switch(t.tag){case 0:case 11:case 15:vn(t),t.flags&2048&&bl(9,t,t.return);break;case 3:vn(t);break;case 12:vn(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Eu(t)):vn(t);break;default:vn(t)}}function Eu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var a=e[l];Qt=a,zd(a,t)}Td(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:bl(8,e,e.return),Eu(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,Eu(e));break;default:Eu(e)}t=t.sibling}}function zd(t,e){for(;Qt!==null;){var l=Qt;switch(l.tag){case 0:case 11:case 15:bl(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Fa(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Qt=a;else t:for(l=t;Qt!==null;){a=Qt;var n=a.sibling,u=a.return;if(hd(a),a===l){Qt=null;break t}if(n!==null){n.return=u,Qt=n;break t}Qt=u}}}var Dy={getCacheForType:function(t){var e=Vt(Rt),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Vt(Rt).controller.signal}},Cy=typeof WeakMap=="function"?WeakMap:Map,rt=0,pt=null,et=null,at=0,ht=0,ge=null,Sl=!1,_a=!1,Cc=!1,ll=0,Ut=0,pl=0,$l=0,Rc=0,be=0,ja=0,mn=null,ie=null,Hc=!1,zu=0,Ad=0,Au=1/0,_u=null,Tl=null,Gt=0,El=null,xa=null,al=0,qc=0,Bc=null,_d=null,gn=0,Yc=null;function Se(){return(rt&2)!==0&&at!==0?at&-at:z.T!==null?Lc():wf()}function jd(){if(be===0)if((at&536870912)===0||ut){var t=Cn;Cn<<=1,(Cn&3932160)===0&&(Cn=262144),be=t}else be=536870912;return t=ve.current,t!==null&&(t.flags|=32),be}function ce(t,e,l){(t===pt&&(ht===2||ht===9)||t.cancelPendingCommit!==null)&&(Oa(t,0),zl(t,at,be,!1)),Ba(t,l),((rt&2)===0||t!==pt)&&(t===pt&&((rt&2)===0&&($l|=l),Ut===4&&zl(t,at,be,!1)),Be(t))}function xd(t,e,l){if((rt&6)!==0)throw Error(o(327));var a=!l&&(e&127)===0&&(e&t.expiredLanes)===0||qa(t,e),n=a?qy(t,e):wc(t,e,!0),u=a;do{if(n===0){_a&&!a&&zl(t,e,0,!1);break}else{if(l=t.current.alternate,u&&!Ry(l)){n=wc(t,e,!1),u=!1;continue}if(n===2){if(u=e,t.errorRecoveryDisabledLanes&u)var i=0;else i=t.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){e=i;t:{var f=t;n=mn;var r=f.current.memoizedState.isDehydrated;if(r&&(Oa(f,i).flags|=256),i=wc(f,i,!1),i!==2){if(Cc&&!r){f.errorRecoveryDisabledLanes|=u,$l|=u,n=4;break t}u=ie,ie=n,u!==null&&(ie===null?ie=u:ie.push.apply(ie,u))}n=i}if(u=!1,n!==2)continue}}if(n===1){Oa(t,0),zl(t,e,0,!0);break}t:{switch(a=t,u=n,u){case 0:case 1:throw Error(o(345));case 4:if((e&4194048)!==e)break;case 6:zl(a,e,be,!Sl);break t;case 2:ie=null;break;case 3:case 5:break;default:throw Error(o(329))}if((e&62914560)===e&&(n=zu+300-oe(),10<n)){if(zl(a,e,be,!Sl),Hn(a,0,!0)!==0)break t;al=e,a.timeoutHandle=nr(Od.bind(null,a,l,ie,_u,Hc,e,be,$l,ja,Sl,u,"Throttled",-0,0),n);break t}Od(a,l,ie,_u,Hc,e,be,$l,ja,Sl,u,null,-0,0)}}break}while(!0);Be(t)}function Od(t,e,l,a,n,u,i,f,r,b,A,O,p,T){if(t.timeoutHandle=-1,O=e.subtreeFlags,O&8192||(O&16785408)===16785408){O={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qe},pd(e,u,O);var Y=(u&62914560)===u?zu-oe():(u&4194048)===u?Ad-oe():0;if(Y=bv(O,Y),Y!==null){al=u,t.cancelPendingCommit=Y(qd.bind(null,t,e,u,l,a,n,i,f,r,A,O,null,p,T)),zl(t,u,i,!b);return}}qd(t,e,u,l,a,n,i,f,r)}function Ry(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],u=n.getSnapshot;n=n.value;try{if(!he(u(),n))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function zl(t,e,l,a){e&=~Rc,e&=~$l,t.suspendedLanes|=e,t.pingedLanes&=~e,a&&(t.warmLanes|=e),a=t.expirationTimes;for(var n=e;0<n;){var u=31-re(n),i=1<<u;a[u]=-1,n&=~i}l!==0&&Bf(t,l,e)}function ju(){return(rt&6)===0?(bn(0),!1):!0}function Gc(){if(et!==null){if(ht===0)var t=et.return;else t=et,Ve=wl=null,ec(t),ba=null,Pa=0,t=et;for(;t!==null;)ud(t.alternate,t),t=t.return;et=null}}function Oa(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,tv(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),al=0,Gc(),pt=t,et=l=Le(t.current,null),at=e,ht=0,ge=null,Sl=!1,_a=qa(t,e),Cc=!1,ja=be=Rc=$l=pl=Ut=0,ie=mn=null,Hc=!1,(e&8)!==0&&(e|=e&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=e;0<a;){var n=31-re(a),u=1<<n;e|=t[n],a&=~u}return ll=e,Jn(),l}function Nd(t,e){I=null,z.H=fn,e===ga||e===eu?(e=Ls(),ht=3):e===Zi?(e=Ls(),ht=4):ht=e===gc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,ge=e,et===null&&(Ut=1,vu(t,ze(e,t.current)))}function Md(){var t=ve.current;return t===null?!0:(at&4194048)===at?xe===null:(at&62914560)===at||(at&536870912)!==0?t===xe:!1}function Ud(){var t=z.H;return z.H=fn,t===null?fn:t}function Dd(){var t=z.A;return z.A=Dy,t}function xu(){Ut=4,Sl||(at&4194048)!==at&&ve.current!==null||(_a=!0),(pl&134217727)===0&&($l&134217727)===0||pt===null||zl(pt,at,be,!1)}function wc(t,e,l){var a=rt;rt|=2;var n=Ud(),u=Dd();(pt!==t||at!==e)&&(_u=null,Oa(t,e)),e=!1;var i=Ut;t:do try{if(ht!==0&&et!==null){var f=et,r=ge;switch(ht){case 8:Gc(),i=6;break t;case 3:case 2:case 9:case 6:ve.current===null&&(e=!0);var b=ht;if(ht=0,ge=null,Na(t,f,r,b),l&&_a){i=0;break t}break;default:b=ht,ht=0,ge=null,Na(t,f,r,b)}}Hy(),i=Ut;break}catch(A){Nd(t,A)}while(!0);return e&&t.shellSuspendCounter++,Ve=wl=null,rt=a,z.H=n,z.A=u,et===null&&(pt=null,at=0,Jn()),i}function Hy(){for(;et!==null;)Cd(et)}function qy(t,e){var l=rt;rt|=2;var a=Ud(),n=Dd();pt!==t||at!==e?(_u=null,Au=oe()+500,Oa(t,e)):_a=qa(t,e);t:do try{if(ht!==0&&et!==null){e=et;var u=ge;e:switch(ht){case 1:ht=0,ge=null,Na(t,e,u,1);break;case 2:case 9:if(Qs(u)){ht=0,ge=null,Rd(e);break}e=function(){ht!==2&&ht!==9||pt!==t||(ht=7),Be(t)},u.then(e,e);break t;case 3:ht=7;break t;case 4:ht=5;break t;case 7:Qs(u)?(ht=0,ge=null,Rd(e)):(ht=0,ge=null,Na(t,e,u,7));break;case 5:var i=null;switch(et.tag){case 26:i=et.memoizedState;case 5:case 27:var f=et;if(i?Sr(i):f.stateNode.complete){ht=0,ge=null;var r=f.sibling;if(r!==null)et=r;else{var b=f.return;b!==null?(et=b,Ou(b)):et=null}break e}}ht=0,ge=null,Na(t,e,u,5);break;case 6:ht=0,ge=null,Na(t,e,u,6);break;case 8:Gc(),Ut=6;break t;default:throw Error(o(462))}}By();break}catch(A){Nd(t,A)}while(!0);return Ve=wl=null,z.H=a,z.A=n,rt=l,et!==null?0:(pt=null,at=0,Jn(),Ut)}function By(){for(;et!==null&&!ih();)Cd(et)}function Cd(t){var e=ad(t.alternate,t,ll);t.memoizedProps=t.pendingProps,e===null?Ou(t):et=e}function Rd(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=Fo(l,e,e.pendingProps,e.type,void 0,at);break;case 11:e=Fo(l,e,e.pendingProps,e.type.render,e.ref,at);break;case 5:ec(e);default:ud(l,e),e=et=Us(e,ll),e=ad(l,e,ll)}t.memoizedProps=t.pendingProps,e===null?Ou(t):et=e}function Na(t,e,l,a){Ve=wl=null,ec(e),ba=null,Pa=0;var n=e.return;try{if(_y(t,n,e,l,at)){Ut=1,vu(t,ze(l,t.current)),et=null;return}}catch(u){if(n!==null)throw et=n,u;Ut=1,vu(t,ze(l,t.current)),et=null;return}e.flags&32768?(ut||a===1?t=!0:_a||(at&536870912)!==0?t=!1:(Sl=t=!0,(a===2||a===9||a===3||a===6)&&(a=ve.current,a!==null&&a.tag===13&&(a.flags|=16384))),Hd(e,t)):Ou(e)}function Ou(t){var e=t;do{if((e.flags&32768)!==0){Hd(e,Sl);return}t=e.return;var l=Oy(e.alternate,e,ll);if(l!==null){et=l;return}if(e=e.sibling,e!==null){et=e;return}et=e=t}while(e!==null);Ut===0&&(Ut=5)}function Hd(t,e){do{var l=Ny(t.alternate,t);if(l!==null){l.flags&=32767,et=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){et=t;return}et=t=l}while(t!==null);Ut=6,et=null}function qd(t,e,l,a,n,u,i,f,r){t.cancelPendingCommit=null;do Nu();while(Gt!==0);if((rt&6)!==0)throw Error(o(327));if(e!==null){if(e===t.current)throw Error(o(177));if(u=e.lanes|e.childLanes,u|=Oi,mh(t,l,u,i,f,r),t===pt&&(et=pt=null,at=0),xa=e,El=t,al=l,qc=u,Bc=n,_d=a,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Xy(Un,function(){return Xd(),null})):(t.callbackNode=null,t.callbackPriority=0),a=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,n=R.p,R.p=2,i=rt,rt|=4;try{My(t,e,l)}finally{rt=i,R.p=n,z.T=a}}Gt=1,Bd(),Yd(),Gd()}}function Bd(){if(Gt===1){Gt=0;var t=El,e=xa,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var a=R.p;R.p=2;var n=rt;rt|=4;try{gd(e,t);var u=Ic,i=Es(t.containerInfo),f=u.focusedElem,r=u.selectionRange;if(i!==f&&f&&f.ownerDocument&&Ts(f.ownerDocument.documentElement,f)){if(r!==null&&zi(f)){var b=r.start,A=r.end;if(A===void 0&&(A=b),"selectionStart"in f)f.selectionStart=b,f.selectionEnd=Math.min(A,f.value.length);else{var O=f.ownerDocument||document,p=O&&O.defaultView||window;if(p.getSelection){var T=p.getSelection(),Y=f.textContent.length,Z=Math.min(r.start,Y),bt=r.end===void 0?Z:Math.min(r.end,Y);!T.extend&&Z>bt&&(i=bt,bt=Z,Z=i);var m=ps(f,Z),y=ps(f,bt);if(m&&y&&(T.rangeCount!==1||T.anchorNode!==m.node||T.anchorOffset!==m.offset||T.focusNode!==y.node||T.focusOffset!==y.offset)){var g=O.createRange();g.setStart(m.node,m.offset),T.removeAllRanges(),Z>bt?(T.addRange(g),T.extend(y.node,y.offset)):(g.setEnd(y.node,y.offset),T.addRange(g))}}}}for(O=[],T=f;T=T.parentNode;)T.nodeType===1&&O.push({element:T,left:T.scrollLeft,top:T.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<O.length;f++){var _=O[f];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}Xu=!!Fc,Ic=Fc=null}finally{rt=n,R.p=a,z.T=l}}t.current=e,Gt=2}}function Yd(){if(Gt===2){Gt=0;var t=El,e=xa,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var a=R.p;R.p=2;var n=rt;rt|=4;try{rd(t,e.alternate,e)}finally{rt=n,R.p=a,z.T=l}}Gt=3}}function Gd(){if(Gt===4||Gt===3){Gt=0,ch();var t=El,e=xa,l=al,a=_d;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Gt=5:(Gt=0,xa=El=null,wd(t,t.pendingLanes));var n=t.pendingLanes;if(n===0&&(Tl=null),ni(l),e=e.stateNode,de&&typeof de.onCommitFiberRoot=="function")try{de.onCommitFiberRoot(Ha,e,void 0,(e.current.flags&128)===128)}catch{}if(a!==null){e=z.T,n=R.p,R.p=2,z.T=null;try{for(var u=t.onRecoverableError,i=0;i<a.length;i++){var f=a[i];u(f.value,{componentStack:f.stack})}}finally{z.T=e,R.p=n}}(al&3)!==0&&Nu(),Be(t),n=t.pendingLanes,(l&261930)!==0&&(n&42)!==0?t===Yc?gn++:(gn=0,Yc=t):gn=0,bn(0)}}function wd(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Fa(e)))}function Nu(){return Bd(),Yd(),Gd(),Xd()}function Xd(){if(Gt!==5)return!1;var t=El,e=qc;qc=0;var l=ni(al),a=z.T,n=R.p;try{R.p=32>l?32:l,z.T=null,l=Bc,Bc=null;var u=El,i=al;if(Gt=0,xa=El=null,al=0,(rt&6)!==0)throw Error(o(331));var f=rt;if(rt|=4,Ed(u.current),Sd(u,u.current,i,l),rt=f,bn(0,!1),de&&typeof de.onPostCommitFiberRoot=="function")try{de.onPostCommitFiberRoot(Ha,u)}catch{}return!0}finally{R.p=n,z.T=a,wd(t,e)}}function Qd(t,e,l){e=ze(l,e),e=mc(t.stateNode,e,2),t=vl(t,e,2),t!==null&&(Ba(t,2),Be(t))}function yt(t,e,l){if(t.tag===3)Qd(t,t,l);else for(;e!==null;){if(e.tag===3){Qd(e,t,l);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Tl===null||!Tl.has(a))){t=ze(l,t),l=Zo(2),a=vl(e,l,2),a!==null&&(Lo(l,a,e,t),Ba(a,2),Be(a));break}}e=e.return}}function Xc(t,e,l){var a=t.pingCache;if(a===null){a=t.pingCache=new Cy;var n=new Set;a.set(e,n)}else n=a.get(e),n===void 0&&(n=new Set,a.set(e,n));n.has(l)||(Cc=!0,n.add(l),t=Yy.bind(null,t,e,l),e.then(t,t))}function Yy(t,e,l){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,pt===t&&(at&l)===l&&(Ut===4||Ut===3&&(at&62914560)===at&&300>oe()-zu?(rt&2)===0&&Oa(t,0):Rc|=l,ja===at&&(ja=0)),Be(t)}function Zd(t,e){e===0&&(e=qf()),t=Bl(t,e),t!==null&&(Ba(t,e),Be(t))}function Gy(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Zd(t,l)}function wy(t,e){var l=0;switch(t.tag){case 31:case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(e),Zd(t,l)}function Xy(t,e){return ti(t,e)}var Mu=null,Ma=null,Qc=!1,Uu=!1,Zc=!1,Al=0;function Be(t){t!==Ma&&t.next===null&&(Ma===null?Mu=Ma=t:Ma=Ma.next=t),Uu=!0,Qc||(Qc=!0,Zy())}function bn(t,e){if(!Zc&&Uu){Zc=!0;do for(var l=!1,a=Mu;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,f=a.pingedLanes;u=(1<<31-re(42|t)+1)-1,u&=n&~(i&~f),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Jd(a,u))}else u=at,u=Hn(a,a===pt?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||qa(a,u)||(l=!0,Jd(a,u));a=a.next}while(l);Zc=!1}}function Qy(){Ld()}function Ld(){Uu=Qc=!1;var t=0;Al!==0&&Py()&&(t=Al);for(var e=oe(),l=null,a=Mu;a!==null;){var n=a.next,u=Kd(a,e);u===0?(a.next=null,l===null?Mu=n:l.next=n,n===null&&(Ma=l)):(l=a,(t!==0||(u&3)!==0)&&(Uu=!0)),a=n}Gt!==0&&Gt!==5||bn(t),Al!==0&&(Al=0)}function Kd(t,e){for(var l=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var i=31-re(u),f=1<<i,r=n[i];r===-1?((f&l)===0||(f&a)!==0)&&(n[i]=vh(f,e)):r<=e&&(t.expiredLanes|=f),u&=~f}if(e=pt,l=at,l=Hn(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),a=t.callbackNode,l===0||t===e&&(ht===2||ht===9)||t.cancelPendingCommit!==null)return a!==null&&a!==null&&ei(a),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||qa(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(a!==null&&ei(a),ni(l)){case 2:case 8:l=Rf;break;case 32:l=Un;break;case 268435456:l=Hf;break;default:l=Un}return a=Vd.bind(null,t),l=ti(l,a),t.callbackPriority=e,t.callbackNode=l,e}return a!==null&&a!==null&&ei(a),t.callbackPriority=2,t.callbackNode=null,2}function Vd(t,e){if(Gt!==0&&Gt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Nu()&&t.callbackNode!==l)return null;var a=at;return a=Hn(t,t===pt?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),a===0?null:(xd(t,a,e),Kd(t,oe()),t.callbackNode!=null&&t.callbackNode===l?Vd.bind(null,t):null)}function Jd(t,e){if(Nu())return null;xd(t,e,!0)}function Zy(){ev(function(){(rt&6)!==0?ti(Cf,Qy):Ld()})}function Lc(){if(Al===0){var t=va;t===0&&(t=Dn,Dn<<=1,(Dn&261888)===0&&(Dn=256)),Al=t}return Al}function kd(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Gn(""+t)}function $d(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function Ly(t,e,l,a,n){if(e==="submit"&&l&&l.stateNode===n){var u=kd((n[ee]||null).action),i=a.submitter;i&&(e=(e=i[ee]||null)?kd(e.formAction):i.getAttribute("formAction"),e!==null&&(u=e,i=null));var f=new Zn("action","action",null,a,n);t.push({event:f,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Al!==0){var r=i?$d(n,i):new FormData(n);oc(l,{pending:!0,data:r,method:n.method,action:u},null,r)}}else typeof u=="function"&&(f.preventDefault(),r=i?$d(n,i):new FormData(n),oc(l,{pending:!0,data:r,method:n.method,action:u},u,r))},currentTarget:n}]})}}for(var Kc=0;Kc<xi.length;Kc++){var Vc=xi[Kc],Ky=Vc.toLowerCase(),Vy=Vc[0].toUpperCase()+Vc.slice(1);Ue(Ky,"on"+Vy)}Ue(_s,"onAnimationEnd"),Ue(js,"onAnimationIteration"),Ue(xs,"onAnimationStart"),Ue("dblclick","onDoubleClick"),Ue("focusin","onFocus"),Ue("focusout","onBlur"),Ue(fy,"onTransitionRun"),Ue(sy,"onTransitionStart"),Ue(oy,"onTransitionCancel"),Ue(Os,"onTransitionEnd"),ea("onMouseEnter",["mouseout","mouseover"]),ea("onMouseLeave",["mouseout","mouseover"]),ea("onPointerEnter",["pointerout","pointerover"]),ea("onPointerLeave",["pointerout","pointerover"]),Cl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Jy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sn));function Wd(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var a=t[l],n=a.event;a=a.listeners;t:{var u=void 0;if(e)for(var i=a.length-1;0<=i;i--){var f=a[i],r=f.instance,b=f.currentTarget;if(f=f.listener,r!==u&&n.isPropagationStopped())break t;u=f,n.currentTarget=b;try{u(n)}catch(A){Vn(A)}n.currentTarget=null,u=r}else for(i=0;i<a.length;i++){if(f=a[i],r=f.instance,b=f.currentTarget,f=f.listener,r!==u&&n.isPropagationStopped())break t;u=f,n.currentTarget=b;try{u(n)}catch(A){Vn(A)}n.currentTarget=null,u=r}}}}function lt(t,e){var l=e[ui];l===void 0&&(l=e[ui]=new Set);var a=t+"__bubble";l.has(a)||(Fd(e,t,2,!1),l.add(a))}function Jc(t,e,l){var a=0;e&&(a|=4),Fd(l,t,a,e)}var Du="_reactListening"+Math.random().toString(36).slice(2);function kc(t){if(!t[Du]){t[Du]=!0,Zf.forEach(function(l){l!=="selectionchange"&&(Jy.has(l)||Jc(l,!1,t),Jc(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Du]||(e[Du]=!0,Jc("selectionchange",!1,e))}}function Fd(t,e,l,a){switch(jr(e)){case 2:var n=Tv;break;case 8:n=Ev;break;default:n=of}l=n.bind(null,e,l,t),n=void 0,!yi||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(n=!0),a?n!==void 0?t.addEventListener(e,l,{capture:!0,passive:n}):t.addEventListener(e,l,!0):n!==void 0?t.addEventListener(e,l,{passive:n}):t.addEventListener(e,l,!1)}function $c(t,e,l,a,n){var u=a;if((e&1)===0&&(e&2)===0&&a!==null)t:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var f=a.stateNode.containerInfo;if(f===n)break;if(i===4)for(i=a.return;i!==null;){var r=i.tag;if((r===3||r===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;f!==null;){if(i=Il(f),i===null)return;if(r=i.tag,r===5||r===6||r===26||r===27){a=u=i;continue t}f=f.parentNode}}a=a.return}es(function(){var b=u,A=ri(l),O=[];t:{var p=Ns.get(t);if(p!==void 0){var T=Zn,Y=t;switch(t){case"keypress":if(Xn(l)===0)break t;case"keydown":case"keyup":T=wh;break;case"focusin":Y="focus",T=bi;break;case"focusout":Y="blur",T=bi;break;case"beforeblur":case"afterblur":T=bi;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":T=ns;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":T=Oh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":T=Zh;break;case _s:case js:case xs:T=Uh;break;case Os:T=Kh;break;case"scroll":case"scrollend":T=jh;break;case"wheel":T=Jh;break;case"copy":case"cut":case"paste":T=Ch;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":T=is;break;case"toggle":case"beforetoggle":T=$h}var Z=(e&4)!==0,bt=!Z&&(t==="scroll"||t==="scrollend"),m=Z?p!==null?p+"Capture":null:p;Z=[];for(var y=b,g;y!==null;){var _=y;if(g=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||g===null||m===null||(_=wa(y,m),_!=null&&Z.push(pn(y,_,g))),bt)break;y=y.return}0<Z.length&&(p=new T(p,Y,null,l,A),O.push({event:p,listeners:Z}))}}if((e&7)===0){t:{if(p=t==="mouseover"||t==="pointerover",T=t==="mouseout"||t==="pointerout",p&&l!==di&&(Y=l.relatedTarget||l.fromElement)&&(Il(Y)||Y[Fl]))break t;if((T||p)&&(p=A.window===A?A:(p=A.ownerDocument)?p.defaultView||p.parentWindow:window,T?(Y=l.relatedTarget||l.toElement,T=b,Y=Y?Il(Y):null,Y!==null&&(bt=j(Y),Z=Y.tag,Y!==bt||Z!==5&&Z!==27&&Z!==6)&&(Y=null)):(T=null,Y=b),T!==Y)){if(Z=ns,_="onMouseLeave",m="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(Z=is,_="onPointerLeave",m="onPointerEnter",y="pointer"),bt=T==null?p:Ga(T),g=Y==null?p:Ga(Y),p=new Z(_,y+"leave",T,l,A),p.target=bt,p.relatedTarget=g,_=null,Il(A)===b&&(Z=new Z(m,y+"enter",Y,l,A),Z.target=g,Z.relatedTarget=bt,_=Z),bt=_,T&&Y)e:{for(Z=ky,m=T,y=Y,g=0,_=m;_;_=Z(_))g++;_=0;for(var Q=y;Q;Q=Z(Q))_++;for(;0<g-_;)m=Z(m),g--;for(;0<_-g;)y=Z(y),_--;for(;g--;){if(m===y||y!==null&&m===y.alternate){Z=m;break e}m=Z(m),y=Z(y)}Z=null}else Z=null;T!==null&&Id(O,p,T,Z,!1),Y!==null&&bt!==null&&Id(O,bt,Y,Z,!0)}}t:{if(p=b?Ga(b):window,T=p.nodeName&&p.nodeName.toLowerCase(),T==="select"||T==="input"&&p.type==="file")var st=ys;else if(rs(p))if(vs)st=uy;else{st=ay;var w=ly}else T=p.nodeName,!T||T.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?b&&oi(b.elementType)&&(st=ys):st=ny;if(st&&(st=st(t,b))){hs(O,st,l,A);break t}w&&w(t,p,b),t==="focusout"&&b&&p.type==="number"&&b.memoizedProps.value!=null&&si(p,"number",p.value)}switch(w=b?Ga(b):window,t){case"focusin":(rs(w)||w.contentEditable==="true")&&(ca=w,Ai=b,ka=null);break;case"focusout":ka=Ai=ca=null;break;case"mousedown":_i=!0;break;case"contextmenu":case"mouseup":case"dragend":_i=!1,zs(O,l,A);break;case"selectionchange":if(cy)break;case"keydown":case"keyup":zs(O,l,A)}var P;if(pi)t:{switch(t){case"compositionstart":var nt="onCompositionStart";break t;case"compositionend":nt="onCompositionEnd";break t;case"compositionupdate":nt="onCompositionUpdate";break t}nt=void 0}else ia?os(t,l)&&(nt="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(nt="onCompositionStart");nt&&(cs&&l.locale!=="ko"&&(ia||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&ia&&(P=ls()):(fl=A,vi="value"in fl?fl.value:fl.textContent,ia=!0)),w=Cu(b,nt),0<w.length&&(nt=new us(nt,t,null,l,A),O.push({event:nt,listeners:w}),P?nt.data=P:(P=ds(l),P!==null&&(nt.data=P)))),(P=Fh?Ih(t,l):Ph(t,l))&&(nt=Cu(b,"onBeforeInput"),0<nt.length&&(w=new us("onBeforeInput","beforeinput",null,l,A),O.push({event:w,listeners:nt}),w.data=P)),Ly(O,t,b,l,A)}Wd(O,e)})}function pn(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Cu(t,e){for(var l=e+"Capture",a=[];t!==null;){var n=t,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=wa(t,l),n!=null&&a.unshift(pn(t,n,u)),n=wa(t,e),n!=null&&a.push(pn(t,n,u))),t.tag===3)return a;t=t.return}return[]}function ky(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Id(t,e,l,a,n){for(var u=e._reactName,i=[];l!==null&&l!==a;){var f=l,r=f.alternate,b=f.stateNode;if(f=f.tag,r!==null&&r===a)break;f!==5&&f!==26&&f!==27||b===null||(r=b,n?(b=wa(l,u),b!=null&&i.unshift(pn(l,b,r))):n||(b=wa(l,u),b!=null&&i.push(pn(l,b,r)))),l=l.return}i.length!==0&&t.push({event:e,listeners:i})}var $y=/\\r\\n?/g,Wy=/\\u0000|\\uFFFD/g;function Pd(t){return(typeof t=="string"?t:""+t).replace($y,\`
16
- \`).replace(Wy,"")}function tr(t,e){return e=Pd(e),Pd(t)===e}function gt(t,e,l,a,n,u){switch(l){case"children":typeof a=="string"?e==="body"||e==="textarea"&&a===""||aa(t,a):(typeof a=="number"||typeof a=="bigint")&&e!=="body"&&aa(t,""+a);break;case"className":Bn(t,"class",a);break;case"tabIndex":Bn(t,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Bn(t,l,a);break;case"style":Pf(t,a,u);break;case"data":if(e!=="object"){Bn(t,"data",a);break}case"src":case"href":if(a===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(l);break}a=Gn(""+a),t.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(l==="formAction"?(e!=="input"&&gt(t,e,"name",n.name,n,null),gt(t,e,"formEncType",n.formEncType,n,null),gt(t,e,"formMethod",n.formMethod,n,null),gt(t,e,"formTarget",n.formTarget,n,null)):(gt(t,e,"encType",n.encType,n,null),gt(t,e,"method",n.method,n,null),gt(t,e,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(l);break}a=Gn(""+a),t.setAttribute(l,a);break;case"onClick":a!=null&&(t.onclick=Qe);break;case"onScroll":a!=null&&lt("scroll",t);break;case"onScrollEnd":a!=null&&lt("scrollend",t);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));t.innerHTML=l}}break;case"multiple":t.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":t.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){t.removeAttribute("xlink:href");break}l=Gn(""+a),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,""+a):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":a===!0?t.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,a):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?t.setAttribute(l,a):t.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?t.removeAttribute(l):t.setAttribute(l,a);break;case"popover":lt("beforetoggle",t),lt("toggle",t),qn(t,"popover",a);break;case"xlinkActuate":Xe(t,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Xe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Xe(t,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Xe(t,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Xe(t,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Xe(t,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Xe(t,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Xe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Xe(t,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":qn(t,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ah.get(l)||l,qn(t,l,a))}}function Wc(t,e,l,a,n,u){switch(l){case"style":Pf(t,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));t.innerHTML=l}}break;case"children":typeof a=="string"?aa(t,a):(typeof a=="number"||typeof a=="bigint")&&aa(t,""+a);break;case"onScroll":a!=null&&lt("scroll",t);break;case"onScrollEnd":a!=null&&lt("scrollend",t);break;case"onClick":a!=null&&(t.onclick=Qe);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lf.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),e=l.slice(2,n?l.length-7:void 0),u=t[ee]||null,u=u!=null?u[l]:null,typeof u=="function"&&t.removeEventListener(e,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,a,n);break t}l in t?t[l]=a:a===!0?t.setAttribute(l,""):qn(t,l,a)}}}function kt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",t),lt("load",t);var a=!1,n=!1,u;for(u in l)if(l.hasOwnProperty(u)){var i=l[u];if(i!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:gt(t,e,u,i,l,null)}}n&&gt(t,e,"srcSet",l.srcSet,l,null),a&&gt(t,e,"src",l.src,l,null);return;case"input":lt("invalid",t);var f=u=i=n=null,r=null,b=null;for(a in l)if(l.hasOwnProperty(a)){var A=l[a];if(A!=null)switch(a){case"name":n=A;break;case"type":i=A;break;case"checked":r=A;break;case"defaultChecked":b=A;break;case"value":u=A;break;case"defaultValue":f=A;break;case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(137,e));break;default:gt(t,e,a,A,l,null)}}$f(t,u,f,r,b,i,n,!1);return;case"select":lt("invalid",t),a=i=u=null;for(n in l)if(l.hasOwnProperty(n)&&(f=l[n],f!=null))switch(n){case"value":u=f;break;case"defaultValue":i=f;break;case"multiple":a=f;default:gt(t,e,n,f,l,null)}e=u,l=i,t.multiple=!!a,e!=null?la(t,!!a,e,!1):l!=null&&la(t,!!a,l,!0);return;case"textarea":lt("invalid",t),u=n=a=null;for(i in l)if(l.hasOwnProperty(i)&&(f=l[i],f!=null))switch(i){case"value":a=f;break;case"defaultValue":n=f;break;case"children":u=f;break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:gt(t,e,i,f,l,null)}Ff(t,a,n,u);return;case"option":for(r in l)if(l.hasOwnProperty(r)&&(a=l[r],a!=null))switch(r){case"selected":t.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:gt(t,e,r,a,l,null)}return;case"dialog":lt("beforetoggle",t),lt("toggle",t),lt("cancel",t),lt("close",t);break;case"iframe":case"object":lt("load",t);break;case"video":case"audio":for(a=0;a<Sn.length;a++)lt(Sn[a],t);break;case"image":lt("error",t),lt("load",t);break;case"details":lt("toggle",t);break;case"embed":case"source":case"link":lt("error",t),lt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(b in l)if(l.hasOwnProperty(b)&&(a=l[b],a!=null))switch(b){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:gt(t,e,b,a,l,null)}return;default:if(oi(e)){for(A in l)l.hasOwnProperty(A)&&(a=l[A],a!==void 0&&Wc(t,e,A,a,l,void 0));return}}for(f in l)l.hasOwnProperty(f)&&(a=l[f],a!=null&&gt(t,e,f,a,l,null))}function Fy(t,e,l,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,i=null,f=null,r=null,b=null,A=null;for(T in l){var O=l[T];if(l.hasOwnProperty(T)&&O!=null)switch(T){case"checked":break;case"value":break;case"defaultValue":r=O;default:a.hasOwnProperty(T)||gt(t,e,T,null,a,O)}}for(var p in a){var T=a[p];if(O=l[p],a.hasOwnProperty(p)&&(T!=null||O!=null))switch(p){case"type":u=T;break;case"name":n=T;break;case"checked":b=T;break;case"defaultChecked":A=T;break;case"value":i=T;break;case"defaultValue":f=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(137,e));break;default:T!==O&&gt(t,e,p,T,a,O)}}fi(t,i,f,r,b,A,u,n);return;case"select":T=i=f=p=null;for(u in l)if(r=l[u],l.hasOwnProperty(u)&&r!=null)switch(u){case"value":break;case"multiple":T=r;default:a.hasOwnProperty(u)||gt(t,e,u,null,a,r)}for(n in a)if(u=a[n],r=l[n],a.hasOwnProperty(n)&&(u!=null||r!=null))switch(n){case"value":p=u;break;case"defaultValue":f=u;break;case"multiple":i=u;default:u!==r&&gt(t,e,n,u,a,r)}e=f,l=i,a=T,p!=null?la(t,!!l,p,!1):!!a!=!!l&&(e!=null?la(t,!!l,e,!0):la(t,!!l,l?[]:"",!1));return;case"textarea":T=p=null;for(f in l)if(n=l[f],l.hasOwnProperty(f)&&n!=null&&!a.hasOwnProperty(f))switch(f){case"value":break;case"children":break;default:gt(t,e,f,null,a,n)}for(i in a)if(n=a[i],u=l[i],a.hasOwnProperty(i)&&(n!=null||u!=null))switch(i){case"value":p=n;break;case"defaultValue":T=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(o(91));break;default:n!==u&&gt(t,e,i,n,a,u)}Wf(t,p,T);return;case"option":for(var Y in l)if(p=l[Y],l.hasOwnProperty(Y)&&p!=null&&!a.hasOwnProperty(Y))switch(Y){case"selected":t.selected=!1;break;default:gt(t,e,Y,null,a,p)}for(r in a)if(p=a[r],T=l[r],a.hasOwnProperty(r)&&p!==T&&(p!=null||T!=null))switch(r){case"selected":t.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:gt(t,e,r,p,a,T)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Z in l)p=l[Z],l.hasOwnProperty(Z)&&p!=null&&!a.hasOwnProperty(Z)&&gt(t,e,Z,null,a,p);for(b in a)if(p=a[b],T=l[b],a.hasOwnProperty(b)&&p!==T&&(p!=null||T!=null))switch(b){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(137,e));break;default:gt(t,e,b,p,a,T)}return;default:if(oi(e)){for(var bt in l)p=l[bt],l.hasOwnProperty(bt)&&p!==void 0&&!a.hasOwnProperty(bt)&&Wc(t,e,bt,void 0,a,p);for(A in a)p=a[A],T=l[A],!a.hasOwnProperty(A)||p===T||p===void 0&&T===void 0||Wc(t,e,A,p,a,T);return}}for(var m in l)p=l[m],l.hasOwnProperty(m)&&p!=null&&!a.hasOwnProperty(m)&&gt(t,e,m,null,a,p);for(O in a)p=a[O],T=l[O],!a.hasOwnProperty(O)||p===T||p==null&&T==null||gt(t,e,O,p,a,T)}function er(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Iy(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],u=n.transferSize,i=n.initiatorType,f=n.duration;if(u&&f&&er(i)){for(i=0,f=n.responseEnd,a+=1;a<l.length;a++){var r=l[a],b=r.startTime;if(b>f)break;var A=r.transferSize,O=r.initiatorType;A&&er(O)&&(r=r.responseEnd,i+=A*(r<f?1:(f-b)/(r-b)))}if(--a,e+=8*(u+i)/(n.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Fc=null,Ic=null;function Ru(t){return t.nodeType===9?t:t.ownerDocument}function lr(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ar(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Pc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var tf=null;function Py(){var t=window.event;return t&&t.type==="popstate"?t===tf?!1:(tf=t,!0):(tf=null,!1)}var nr=typeof setTimeout=="function"?setTimeout:void 0,tv=typeof clearTimeout=="function"?clearTimeout:void 0,ur=typeof Promise=="function"?Promise:void 0,ev=typeof queueMicrotask=="function"?queueMicrotask:typeof ur<"u"?function(t){return ur.resolve(null).then(t).catch(lv)}:nr;function lv(t){setTimeout(function(){throw t})}function _l(t){return t==="head"}function ir(t,e){var l=e,a=0;do{var n=l.nextSibling;if(t.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){t.removeChild(n),Ra(e);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Tn(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Tn(l);for(var u=l.firstChild;u;){var i=u.nextSibling,f=u.nodeName;u[Ya]||f==="SCRIPT"||f==="STYLE"||f==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=i}}else l==="body"&&Tn(t.ownerDocument.body);l=n}while(l);Ra(e)}function cr(t,e){var l=t;t=0;do{var a=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=a}while(l)}function ef(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ef(l),ii(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function av(t,e,l,a){for(;t.nodeType===1;){var n=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!a&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(a){if(!t[Ya])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==n.rel||t.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||t.getAttribute("title")!==(n.title==null?null:n.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(n.src==null?null:n.src)||t.getAttribute("type")!==(n.type==null?null:n.type)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=Oe(t.nextSibling),t===null)break}return null}function nv(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Oe(t.nextSibling),t===null))return null;return t}function fr(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Oe(t.nextSibling),t===null))return null;return t}function lf(t){return t.data==="$?"||t.data==="$~"}function af(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function uv(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var a=function(){e(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),t._reactRetry=a}}function Oe(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var nf=null;function sr(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Oe(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function or(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function dr(t,e,l){switch(e=Ru(l),t){case"html":if(t=e.documentElement,!t)throw Error(o(452));return t;case"head":if(t=e.head,!t)throw Error(o(453));return t;case"body":if(t=e.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function Tn(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);ii(t)}var Ne=new Map,rr=new Set;function Hu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var nl=R.d;R.d={f:iv,r:cv,D:fv,C:sv,L:ov,m:dv,X:hv,S:rv,M:yv};function iv(){var t=nl.f(),e=ju();return t||e}function cv(t){var e=Pl(t);e!==null&&e.tag===5&&e.type==="form"?No(e):nl.r(t)}var Ua=typeof document>"u"?null:document;function hr(t,e,l){var a=Ua;if(a&&typeof e=="string"&&e){var n=Te(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),rr.has(n)||(rr.add(n),t={rel:t,crossOrigin:l,href:e},a.querySelector(n)===null&&(e=a.createElement("link"),kt(e,"link",t),Xt(e),a.head.appendChild(e)))}}function fv(t){nl.D(t),hr("dns-prefetch",t,null)}function sv(t,e){nl.C(t,e),hr("preconnect",t,e)}function ov(t,e,l){nl.L(t,e,l);var a=Ua;if(a&&t&&e){var n='link[rel="preload"][as="'+Te(e)+'"]';e==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Te(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Te(l.imageSizes)+'"]')):n+='[href="'+Te(t)+'"]';var u=n;switch(e){case"style":u=Da(t);break;case"script":u=Ca(t)}Ne.has(u)||(t=E({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ne.set(u,t),a.querySelector(n)!==null||e==="style"&&a.querySelector(En(u))||e==="script"&&a.querySelector(zn(u))||(e=a.createElement("link"),kt(e,"link",t),Xt(e),a.head.appendChild(e)))}}function dv(t,e){nl.m(t,e);var l=Ua;if(l&&t){var a=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Te(a)+'"][href="'+Te(t)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ca(t)}if(!Ne.has(u)&&(t=E({rel:"modulepreload",href:t},e),Ne.set(u,t),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(zn(u)))return}a=l.createElement("link"),kt(a,"link",t),Xt(a),l.head.appendChild(a)}}}function rv(t,e,l){nl.S(t,e,l);var a=Ua;if(a&&t){var n=ta(a).hoistableStyles,u=Da(t);e=e||"default";var i=n.get(u);if(!i){var f={loading:0,preload:null};if(i=a.querySelector(En(u)))f.loading=5;else{t=E({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ne.get(u))&&uf(t,l);var r=i=a.createElement("link");Xt(r),kt(r,"link",t),r._p=new Promise(function(b,A){r.onload=b,r.onerror=A}),r.addEventListener("load",function(){f.loading|=1}),r.addEventListener("error",function(){f.loading|=2}),f.loading|=4,qu(i,e,a)}i={type:"stylesheet",instance:i,count:1,state:f},n.set(u,i)}}}function hv(t,e){nl.X(t,e);var l=Ua;if(l&&t){var a=ta(l).hoistableScripts,n=Ca(t),u=a.get(n);u||(u=l.querySelector(zn(n)),u||(t=E({src:t,async:!0},e),(e=Ne.get(n))&&cf(t,e),u=l.createElement("script"),Xt(u),kt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function yv(t,e){nl.M(t,e);var l=Ua;if(l&&t){var a=ta(l).hoistableScripts,n=Ca(t),u=a.get(n);u||(u=l.querySelector(zn(n)),u||(t=E({src:t,async:!0,type:"module"},e),(e=Ne.get(n))&&cf(t,e),u=l.createElement("script"),Xt(u),kt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function yr(t,e,l,a){var n=(n=tt.current)?Hu(n):null;if(!n)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=Da(l.href),l=ta(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Da(l.href);var u=ta(n).hoistableStyles,i=u.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=n.querySelector(En(t)))&&!u._p&&(i.instance=u,i.state.loading=5),Ne.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ne.set(t,l),u||vv(n,t,l,i.state))),e&&a===null)throw Error(o(528,""));return i}if(e&&a!==null)throw Error(o(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Ca(l),l=ta(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function Da(t){return'href="'+Te(t)+'"'}function En(t){return'link[rel="stylesheet"]['+t+"]"}function vr(t){return E({},t,{"data-precedence":t.precedence,precedence:null})}function vv(t,e,l,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),kt(e,"link",l),Xt(e),t.head.appendChild(e))}function Ca(t){return'[src="'+Te(t)+'"]'}function zn(t){return"script[async]"+t}function mr(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+Te(l.href)+'"]');if(a)return e.instance=a,Xt(a),a;var n=E({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),Xt(a),kt(a,"style",n),qu(a,l.precedence,t),e.instance=a;case"stylesheet":n=Da(l.href);var u=t.querySelector(En(n));if(u)return e.state.loading|=4,e.instance=u,Xt(u),u;a=vr(l),(n=Ne.get(n))&&uf(a,n),u=(t.ownerDocument||t).createElement("link"),Xt(u);var i=u;return i._p=new Promise(function(f,r){i.onload=f,i.onerror=r}),kt(u,"link",a),e.state.loading|=4,qu(u,l.precedence,t),e.instance=u;case"script":return u=Ca(l.src),(n=t.querySelector(zn(u)))?(e.instance=n,Xt(n),n):(a=l,(n=Ne.get(u))&&(a=E({},l),cf(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),Xt(n),kt(n,"link",a),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,qu(a,l.precedence,t));return e.instance}function qu(t,e,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i<a.length;i++){var f=a[i];if(f.dataset.precedence===e)u=f;else if(u!==n)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function uf(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function cf(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Bu=null;function gr(t,e,l){if(Bu===null){var a=new Map,n=Bu=new Map;n.set(l,a)}else n=Bu,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(t))return a;for(a.set(t,null),l=l.getElementsByTagName(t),n=0;n<l.length;n++){var u=l[n];if(!(u[Ya]||u[Lt]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(e)||"";i=t+i;var f=a.get(i);f?f.push(u):a.set(i,[u])}}return a}function br(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function mv(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Sr(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function gv(t,e,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Da(a.href),u=e.querySelector(En(n));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Yu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,Xt(u);return}u=e.ownerDocument||e,a=vr(a),(n=Ne.get(n))&&uf(a,n),u=u.createElement("link"),Xt(u);var i=u;i._p=new Promise(function(f,r){i.onload=f,i.onerror=r}),kt(u,"link",a),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Yu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var ff=0;function bv(t,e){return t.stylesheets&&t.count===0&&wu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var a=setTimeout(function(){if(t.stylesheets&&wu(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&ff===0&&(ff=62500*Iy());var n=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&wu(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>ff?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Yu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Gu=null;function wu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Gu=new Map,e.forEach(Sv,t),Gu=null,Yu.call(t))}function Sv(t,e){if(!(e.state.loading&4)){var l=Gu.get(t);if(l)var a=l.get(null);else{l=new Map,Gu.set(t,l);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var i=n[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(l.set(i.dataset.precedence,i),a=i)}a&&l.set(null,a)}n=e.instance,i=n.getAttribute("data-precedence"),u=l.get(i)||a,u===a&&l.set(null,n),l.set(i,n),this.count++,a=Yu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(n,t.firstChild)),e.state.loading|=4}}var An={$$typeof:Ot,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function pv(t,e,l,a,n,u,i,f,r){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=li(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=li(0),this.hiddenUpdates=li(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=r,this.incompleteTransitions=new Map}function pr(t,e,l,a,n,u,i,f,r,b,A,O){return t=new pv(t,e,l,i,r,b,A,O,f),e=1,u===!0&&(e|=24),u=ye(3,null,null,e),t.current=u,u.stateNode=t,e=wi(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:e},Li(u),t}function Tr(t){return t?(t=oa,t):oa}function Er(t,e,l,a,n,u){n=Tr(n),a.context===null?a.context=n:a.pendingContext=n,a=yl(e),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=vl(t,a,e),l!==null&&(ce(l,t,e),en(l,t,e))}function zr(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function sf(t,e){zr(t,e),(t=t.alternate)&&zr(t,e)}function Ar(t){if(t.tag===13||t.tag===31){var e=Bl(t,67108864);e!==null&&ce(e,t,67108864),sf(t,67108864)}}function _r(t){if(t.tag===13||t.tag===31){var e=Se();e=ai(e);var l=Bl(t,e);l!==null&&ce(l,t,e),sf(t,e)}}var Xu=!0;function Tv(t,e,l,a){var n=z.T;z.T=null;var u=R.p;try{R.p=2,of(t,e,l,a)}finally{R.p=u,z.T=n}}function Ev(t,e,l,a){var n=z.T;z.T=null;var u=R.p;try{R.p=8,of(t,e,l,a)}finally{R.p=u,z.T=n}}function of(t,e,l,a){if(Xu){var n=df(a);if(n===null)$c(t,e,a,Qu,l),xr(t,a);else if(Av(n,t,e,l,a))a.stopPropagation();else if(xr(t,a),e&4&&-1<zv.indexOf(t)){for(;n!==null;){var u=Pl(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Dl(u.pendingLanes);if(i!==0){var f=u;for(f.pendingLanes|=2,f.entangledLanes|=2;i;){var r=1<<31-re(i);f.entanglements[1]|=r,i&=~r}Be(u),(rt&6)===0&&(Au=oe()+500,bn(0))}}break;case 31:case 13:f=Bl(u,2),f!==null&&ce(f,u,2),ju(),sf(u,2)}if(u=df(a),u===null&&$c(t,e,a,Qu,l),u===n)break;n=u}n!==null&&a.stopPropagation()}else $c(t,e,a,null,l)}}function df(t){return t=ri(t),rf(t)}var Qu=null;function rf(t){if(Qu=null,t=Il(t),t!==null){var e=j(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=D(e),t!==null)return t;t=null}else if(l===31){if(t=V(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Qu=t,null}function jr(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fh()){case Cf:return 2;case Rf:return 8;case Un:case sh:return 32;case Hf:return 268435456;default:return 32}default:return 32}}var hf=!1,jl=null,xl=null,Ol=null,_n=new Map,jn=new Map,Nl=[],zv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function xr(t,e){switch(t){case"focusin":case"focusout":jl=null;break;case"dragenter":case"dragleave":xl=null;break;case"mouseover":case"mouseout":Ol=null;break;case"pointerover":case"pointerout":_n.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":jn.delete(e.pointerId)}}function xn(t,e,l,a,n,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},e!==null&&(e=Pl(e),e!==null&&Ar(e)),t):(t.eventSystemFlags|=a,e=t.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),t)}function Av(t,e,l,a,n){switch(e){case"focusin":return jl=xn(jl,t,e,l,a,n),!0;case"dragenter":return xl=xn(xl,t,e,l,a,n),!0;case"mouseover":return Ol=xn(Ol,t,e,l,a,n),!0;case"pointerover":var u=n.pointerId;return _n.set(u,xn(_n.get(u)||null,t,e,l,a,n)),!0;case"gotpointercapture":return u=n.pointerId,jn.set(u,xn(jn.get(u)||null,t,e,l,a,n)),!0}return!1}function Or(t){var e=Il(t.target);if(e!==null){var l=j(e);if(l!==null){if(e=l.tag,e===13){if(e=D(l),e!==null){t.blockedOn=e,Xf(t.priority,function(){_r(l)});return}}else if(e===31){if(e=V(l),e!==null){t.blockedOn=e,Xf(t.priority,function(){_r(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Zu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=df(t.nativeEvent);if(l===null){l=t.nativeEvent;var a=new l.constructor(l.type,l);di=a,l.target.dispatchEvent(a),di=null}else return e=Pl(l),e!==null&&Ar(e),t.blockedOn=l,!1;e.shift()}return!0}function Nr(t,e,l){Zu(t)&&l.delete(e)}function _v(){hf=!1,jl!==null&&Zu(jl)&&(jl=null),xl!==null&&Zu(xl)&&(xl=null),Ol!==null&&Zu(Ol)&&(Ol=null),_n.forEach(Nr),jn.forEach(Nr)}function Lu(t,e){t.blockedOn===e&&(t.blockedOn=null,hf||(hf=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,_v)))}var Ku=null;function Mr(t){Ku!==t&&(Ku=t,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){Ku===t&&(Ku=null);for(var e=0;e<t.length;e+=3){var l=t[e],a=t[e+1],n=t[e+2];if(typeof a!="function"){if(rf(a||l)===null)continue;break}var u=Pl(l);u!==null&&(t.splice(e,3),e-=3,oc(u,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Ra(t){function e(r){return Lu(r,t)}jl!==null&&Lu(jl,t),xl!==null&&Lu(xl,t),Ol!==null&&Lu(Ol,t),_n.forEach(e),jn.forEach(e);for(var l=0;l<Nl.length;l++){var a=Nl[l];a.blockedOn===t&&(a.blockedOn=null)}for(;0<Nl.length&&(l=Nl[0],l.blockedOn===null);)Or(l),l.blockedOn===null&&Nl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],u=l[a+1],i=n[ee]||null;if(typeof u=="function")i||Mr(l);else if(i){var f=null;if(u&&u.hasAttribute("formAction")){if(n=u,i=u[ee]||null)f=i.formAction;else if(rf(n)!==null)continue}else f=i.action;typeof f=="function"?l[a+1]=f:(l.splice(a,3),a-=3),Mr(l)}}}function Ur(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function e(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),n!==null&&(n(),n=null)}}}function yf(t){this._internalRoot=t}Vu.prototype.render=yf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(o(409));var l=e.current,a=Se();Er(l,a,t,e,null,null)},Vu.prototype.unmount=yf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Er(t.current,2,null,t,null,null),ju(),e[Fl]=null}};function Vu(t){this._internalRoot=t}Vu.prototype.unstable_scheduleHydration=function(t){if(t){var e=wf();t={blockedOn:null,target:t,priority:e};for(var l=0;l<Nl.length&&e!==0&&e<Nl[l].priority;l++);Nl.splice(l,0,t),l===0&&Or(t)}};var Dr=s.version;if(Dr!=="19.2.8")throw Error(o(527,Dr,"19.2.8"));R.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=S(e),t=t!==null?U(t):null,t=t===null?null:t.stateNode,t};var jv={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ju.isDisabled&&Ju.supportsFiber)try{Ha=Ju.inject(jv),de=Ju}catch{}}return Nn.createRoot=function(t,e){if(!x(t))throw Error(o(299));var l=!1,a="",n=Go,u=wo,i=Xo;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(a=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=pr(t,1,!1,null,null,l,a,null,n,u,i,Ur),t[Fl]=e.current,kc(t),new yf(e)},Nn.hydrateRoot=function(t,e,l){if(!x(t))throw Error(o(299));var a=!1,n="",u=Go,i=wo,f=Xo,r=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(f=l.onRecoverableError),l.formState!==void 0&&(r=l.formState)),e=pr(t,1,!0,e,l??null,a,n,r,u,i,f,Ur),e.context=Tr(null),l=e.current,a=Se(),a=ai(a),n=yl(a),n.callback=null,vl(l,n,a),l=a,e.current.lanes=l,Ba(e,l),Be(e),t[Fl]=e.current,kc(t),new Vu(e)},Nn.version="19.2.8",Nn}var Qr;function qv(){if(Qr)return gf.exports;Qr=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(s){console.error(s)}}return c(),gf.exports=Hv(),gf.exports}var Bv=qv(),Yv=["runtime.ready","store.ready","runtime.stopping","agent.loaded","agent.disposed","agent.warning","plugin.loaded","plugin.slow","approval.requested","approval.resolved","handoff.start","handoff.result","turn.start","context.assembled","context.dropped","context.pressure","compaction.stage","context.reset","phase.changed","model.call","model.chunk","model.retry","model.result","tool.call","tool.result","tool.gated","tool.repair","tools.refreshed","agent.channel.status","agent.channel.error","agent.channel.rejected","delivery.sent","delivery.retry","delivery.failed","delivery.uncertain","runtime.released","schedules.reconciled","schedule.fired","schedule.skipped","schedule.deferred","schedule.error","turn.end","error"],Gv=/\\r\\n\\r\\n|\\n\\n|\\r\\r/;function Zr(c){const s=[];let h,o,x;for(const j of c.split(/\\r\\n|\\n|\\r/)){if(j===""||j.startsWith(":"))continue;const D=j.indexOf(":"),V=D===-1?j:j.slice(0,D);let q=D===-1?"":j.slice(D+1);switch(q.startsWith(" ")&&(q=q.slice(1)),V){case"data":s.push(q);break;case"event":h=q;break;case"id":o=q;break;case"retry":{const S=Number.parseInt(q,10);Number.isFinite(S)&&(x=S);break}}}if(!(s.length===0&&h===void 0))return{...h===void 0?{}:{event:h},data:s.join(\`
17
- \`),...o===void 0?{}:{id:o},...x===void 0?{}:{retry:x}}}async function*wv(c){const s=new TextDecoder;let h="";for await(const o of c)for(h+=typeof o=="string"?o:s.decode(o,{stream:!0});;){const x=Gv.exec(h);if(x===null)break;const j=h.slice(0,x.index);h=h.slice(x.index+x[0].length);const D=Zr(j);D!==void 0&&(yield D)}if(h+=s.decode(),h.trim()!==""){const o=Zr(h);o!==void 0&&(yield o)}}function $r(){return{push:c=>c,endStep:()=>"",end:()=>""}}function Xv(c){return c!=="final"&&c!=="stopped"}function Qv(c,s={}){switch(c){case"final":return;case"max_steps":return\`stopped\${s.steps===void 0?"":\` after \${s.steps} steps\`} without finishing — say "continue" to carry on, or raise limits.maxSteps\`;case"no_progress":return'stopped: the same tool call was repeated with no change — say "continue" with more to go on, or check whether that tool is telling it anything useful';case"truncated":return"the reply was cut off at the output limit — raise model.<role>.maxTokens, or ask for less";case"timeout":return\`timed out\${s.durationMs===void 0?"":\` after \${s.durationMs} ms\`} — raise limits.turnTimeoutMs\`;case"stopped":return s.cancelledAfterMs===void 0?"cancelled":\`cancelled after \${s.cancelledAfterMs.toFixed(0)} ms\`;case"error":return}}var Zv="<<<",Lv=">>>",$u=/^\\s*(?:[-*+]\\s+|\\d+[.)]\\s+)?<?\\s*action\\s*:\\s*(.+?)\\s*>?\\s*$/i,Kv=/^\\s*(?:[-*+]\\s+|\\d+[.)]\\s+)?([A-Za-z_][\\w.-]*?)\\s*:\\s*(.*)$/,_f=/^\\s*\`{3,}\\s*[\\w+-]*\\s*$/,Lr=/^\\s*end\\s*$/i,Vv=/^\\s*<\\s*action\\s*>\\s*$/i,Kr=/^\\s*<\\s*\\/\\s*action\\s*>\\s*$/i,Jv=/^\\s*<\\/?\\s*[A-Za-z_][\\w.:-]*\\s*\\/?\\s*>\\s*$/;function Tf(c){return c.replace(/^[\`'"*<]+/,"").replace(/[\`'"*>]+$/,"").replace(/[.,;:]+$/,"").trim()}function Wr(c,s,h){const o=c.fields.get(s);o===void 0?c.fields.set(s,[h]):o.push(h)}function Fr(c){if(c.block===void 0||c.heredocKey===void 0)return;const s=[...c.heredocLines];s[s.length-1]===""&&s.pop(),Wr(c.block,c.heredocKey,s.join(\`
18
- \`)),c.block.wrapped.add(c.heredocKey),c.heredocKey=void 0,c.heredocLines=[]}function Wl(c){Fr(c),c.block!==void 0&&c.blocks.push(c.block),c.block=void 0,c.openKey=void 0,c.awaitingSlug=!1}function Vr(){return{block:void 0,openKey:void 0,heredocKey:void 0,heredocLines:[],justClosed:!1,awaitingSlug:!1,text:[],blocks:[]}}function kv(c,s,h){const o=s.trim();if(c.heredocKey!==void 0){if(o===Lv){Fr(c);return}if(Lr.test(o)){Wl(c),c.justClosed=!0;return}if($u.test(s)){Wl(c);const D=$u.exec(s),V=Tf(D?.[1]??"");V!==""&&(c.block={slug:V,fields:new Map,wrapped:new Set});return}c.heredocLines.push(s);return}const x=$u.exec(s);if(x!==null){const D=Tf(x[1]??"");if(Wl(c),D==="")return;c.block={slug:D,fields:new Map,wrapped:new Set};return}if(Vv.test(s)){Wl(c),c.awaitingSlug=!0;return}if(c.awaitingSlug){if(o==="")return;if(Kr.test(s)){c.awaitingSlug=!1;return}const D=Tf(o);c.awaitingSlug=!1,D!==""&&(c.block={slug:D,fields:new Map,wrapped:new Set});return}if(Kr.test(s)){c.block!==void 0&&(Wl(c),c.justClosed=!0);return}if(Jv.test(s))return;if(c.block===void 0){if(_f.test(s)&&(c.justClosed||h())){c.justClosed=!1;return}c.text.push(s),o!==""&&(c.justClosed=!1);return}if(o===""){c.openKey=void 0;return}if(Lr.test(o)){Wl(c),c.justClosed=!0;return}if(_f.test(s))return;const j=Kv.exec(s);if(j!==null){const D=(j[1]??"").trim(),V=(j[2]??"").trim();V===Zv?(c.heredocKey=D,c.heredocLines=[],c.openKey=void 0):(Wr(c.block,D,V),c.openKey=D);return}if(c.openKey!==void 0){const D=c.block.fields.get(c.openKey),V=D?.[D.length-1];D!==void 0&&V!==void 0&&(D[D.length-1]=V===""?o:\`\${V}
19
- \${o}\`);return}Wl(c),c.text.push(s)}function $v(c){if(/^\\s*(?:[-*+]|\\d+[.)]?)?\\s*$/.test(c))return!0;const s=c.replace(/^\\s*(?:[-*+]\\s+|\\d+[.)]\\s+)?/,"").toLowerCase(),h=s.startsWith("<")?s.slice(1):s;return"action:".startsWith(h)||h.startsWith("action:")||/^<\\/?$/.test(s)||/^<\\/?[a-z_][\\w.:-]*>?$/.test(s)?!0:/^\`{1,3}[\\w+-]*$/.test(s)}function Ef(c){return c.endsWith("\\r")?c.slice(0,-1):c}function Wv(){let c=Vr(),s="",h=0,o,x="",j=!1;const D=E=>{if(E==="")return"";if(E.trim()==="")return x+=E,"";const M=x+E;return x="",j?M:(j=!0,M.replace(/^\\s+/,""))},V=(E,M)=>{const k=c.text.length;return kv(c,E,()=>M!==void 0&&$u.test(M)),c.text.length>k?E:void 0},q=(E,M,k)=>{const ct=V(E,M);return ct===void 0?"":D(ct.slice(k))+D(\`
20
- \`)},S=E=>{if(o===void 0)return"";const M=o;return o=void 0,q(M,E,0)};return{push(E){let M="";s+=E;let k=s.indexOf(\`
21
- \`);for(;k!==-1;){const C=Ef(s.slice(0,k));s=s.slice(k+1),M+=S(C),c.block===void 0&&_f.test(C)&&!c.justClosed?o=C:M+=q(C,void 0,h),h=0,k=s.indexOf(\`
22
- \`)}const ct=Ef(s);return c.block===void 0&&!c.awaitingSlug&&o===void 0&&!$v(ct)&&(M+=D(ct.slice(h)),h=ct.length),M},endStep(){const E=U();return x=\`
23
-
24
- \`,c=Vr(),E},end:U};function U(){let E=S(void 0);const M=Ef(s);if(M!==""){const k=V(M,void 0);k!==void 0&&(E+=D(k.slice(h)))}return s="",h=0,o=void 0,E}}class Ge extends Error{code;hint;field;status;request;constructor(s,h={}){super(s.hint===void 0?s.message:\`\${s.message}
25
- hint: \${s.hint}\`),this.name="DispachError",this.code=s.code,this.hint=s.hint??"",this.field=s.field,this.status=h.status,this.request=h.method===void 0||h.path===void 0?void 0:{method:h.method,path:h.path},h.cause!==void 0&&(this.cause=h.cause)}}function Fv(c,s){const h=c instanceof Error?c.message:String(c);return new Ge({code:"transport_failed",message:\`\${s.method} \${s.path} did not reach \${s.baseUrl}: \${h}\`,hint:"Check the base URL, that the server is running, and that nothing between you and it is refusing the connection. \`GET /v1/health\` needs no token and is the cheapest probe."},{...s,cause:c})}async function Iv(c,s){let h;try{const o=await c.json();typeof o.error?.code=="string"&&typeof o.error.message=="string"&&(h={code:o.error.code,message:o.error.message,...o.error.hint===void 0?{}:{hint:o.error.hint},...o.error.field===void 0?{}:{field:o.error.field}})}catch{}return new Ge(h??{code:\`http_\${c.status}\`,message:\`\${s.method} \${s.path} returned \${c.status} with no error body.\`,hint:"This is not a response this server produces, so something between you and it answered — a proxy, a gateway, or a load balancer. Check the URL and what is in front of it."},{status:c.status,...s})}var Ir=new Set(Yv);async function*Pr(c){for await(const s of wv(Pv(c))){if(s.event===void 0||s.data==="")continue;let h;try{h=JSON.parse(s.data)}catch{continue}yield{name:s.event,data:h}}}async function*Pv(c){const s=c.getReader();try{for(;;){const{done:h,value:o}=await s.read();if(h)return;o!==void 0&&(yield o)}}finally{s.releaseLock()}}async function*tm(c){for await(const{name:s,data:h}of Pr(c)){if(Ir.has(s)){yield{kind:"event",event:h};continue}const o=h??{};switch(s){case"turn.accepted":yield{kind:"accepted",turnId:String(o.turnId??""),sessionKey:String(o.sessionKey??"")};break;case"stream.replay":yield{kind:"replay",report:{state:o.state==="ended"?"ended":"running",events:Number(o.events??0),truncated:o.truncated===!0,dropped:Number(o.dropped??0),chunks:o.chunks==="start"||o.chunks==="partial"?o.chunks:"none"}};break;case"stream.ended":yield{kind:"ended",turnId:String(o.turnId??""),status:String(o.status??"unknown"),steps:typeof o.steps=="number"?o.steps:void 0,errorCode:typeof o.errorCode=="string"?o.errorCode:void 0};break;case"stream.unavailable":yield{kind:"unavailable",turnId:String(o.turnId??""),reason:String(o.reason??"not observable from this process")};break}}}async function*em(c){for await(const{name:s,data:h}of Pr(c)){if(Ir.has(s)){yield{kind:"event",event:h};continue}if(s==="stream.subscribed"){const o=h??{};yield{kind:"subscribed",report:{agentId:typeof o.agentId=="string"?o.agentId:null,types:Array.isArray(o.types)?o.types:null,chunks:o.chunks===!0,implied:typeof o.implied=="string"?o.implied:void 0}}}}}async function*lm(c,s={}){for await(const h of c){if(h.kind==="replay"&&h.report.truncated&&s.allowTruncated!==!0)throw new Ge({code:"replay_truncated",message:\`This turn's replay is missing its oldest \${h.report.dropped} event(s), so the text reconstructed from it would be incomplete.\`,hint:"Read the finished text from GET /v1/agents/:id/turns/:turnId, or pass { allowTruncated: true } to accept a fragment. Streaming from the start of a turn is never truncated — this only happens when reattaching to one that has already produced more events than the buffer holds."});if(h.kind==="unavailable")throw new Ge({code:"turn_not_observable",message:\`Turn \${h.turnId} is recorded as running but is not observable here: \${h.reason}.\`,hint:"Its events are buffered in whichever process is executing it. Poll GET /v1/agents/:id/turns/:turnId for the outcome."});if(h.kind!=="event"||h.event.type!=="model.chunk")continue;const o=h.event.data;o.kind!=="reasoning"&&typeof o.delta=="string"&&(yield o.delta)}}function am(c){const s=c.baseUrl.replace(/\\/+$/,""),h=c.fetch??fetch,o=(S={})=>({...c.token===void 0?{}:{authorization:\`Bearer \${c.token}\`},...S});async function x(S,U,E={}){let M;try{M=await h(\`\${s}\${U}\`,{method:S,headers:o({...E.body===void 0?{}:{"content-type":"application/json"},...E.accept===void 0?{}:{accept:E.accept},...E.headers}),...E.body===void 0?{}:{body:JSON.stringify(E.body)},...E.signal===void 0?{}:{signal:E.signal}})}catch(k){throw Fv(k,{method:S,path:U,baseUrl:s})}if(!M.ok)throw await Iv(M,{method:S,path:U});return M}async function j(S,U,E){return await(await x(S,U,E??{})).json()}async function D(S,U){const E=await x("GET",S,{accept:"text/event-stream",...U===void 0?{}:{signal:U}});if(E.body===null)throw new Ge({code:"no_response_body",message:\`GET \${S} returned \${E.status} with no body to read.\`,hint:"An SSE route always has a body. A missing one means something between you and the server buffered the response — commonly a proxy without streaming enabled."},{status:E.status,method:"GET",path:S});return E.body}function V(S,U,E,M={}){const k=C=>C?.chunks===!0?"?chunks=true":"",ct={turnId:U,sessionKey:E,replayed:M.replayed===!0,async*stream(C){const Tt=await D(\`/v1/agents/\${encodeURIComponent(S)}/turns/\${encodeURIComponent(U)}/stream\${k(C)}\`,C?.signal);yield*tm(Tt)},async*tokens(C){yield*lm(ct.stream({chunks:!0,...C}),{...C?.allowTruncated===void 0?{}:{allowTruncated:C.allowTruncated}})},async text(){for await(const C of ct.stream())if(C.kind==="ended"||C.kind==="unavailable"||C.kind==="event"&&C.event.type==="turn.end")break;return(await ct.get()).text},get:()=>j("GET",\`/v1/agents/\${encodeURIComponent(S)}/turns/\${encodeURIComponent(U)}\`),async stop(){await x("POST",\`/v1/agents/\${encodeURIComponent(S)}/turns/\${encodeURIComponent(U)}/stop\`)}};return ct}function q(S){const U=E=>\`/v1/agents/\${encodeURIComponent(S)}\${E}\`;return{id:S,async send(E,M){const k=await j("POST",U("/messages"),{body:{text:E,...M?.sessionKey===void 0?{}:{sessionKey:M.sessionKey},...M?.deliver===void 0?{}:{deliver:M.deliver},...M?.from===void 0?{}:{from:M.from}},...M?.idempotencyKey===void 0?{}:{headers:{"idempotency-key":M.idempotencyKey}},...M?.signal===void 0?{}:{signal:M.signal}});return V(S,k.turnId,k.sessionKey,{replayed:k.replayed===!0})},turn:E=>V(S,E,""),describe:()=>j("GET",U("")),tools:()=>j("GET",U("/tools")),skills:()=>j("GET",U("/skills")),sessions:()=>j("GET",U("/sessions")),messages:(E,M)=>{const k=new URLSearchParams;M?.before!==void 0&&k.set("before",String(M.before)),M?.limit!==void 0&&k.set("limit",String(M.limit));const ct=k.size===0?"":\`?\${k.toString()}\`;return j("GET",U(\`/sessions/\${encodeURIComponent(E)}/messages\${ct}\`))},clearSession:E=>j("DELETE",U(\`/sessions/\${encodeURIComponent(E)}\`)),reload:()=>j("POST",U("/reload"),{body:{}}),schedules:async()=>(await j("GET",U("/schedules"))).schedules,approvals:async()=>(await j("GET",U("/approvals"))).approvals,createSchedule:E=>j("POST",U("/schedules"),{body:E}),updateSchedule:(E,M)=>j("PATCH",U(\`/schedules/\${encodeURIComponent(E)}\`),{body:M}),deleteSchedule:async E=>{await j("DELETE",U(\`/schedules/\${encodeURIComponent(E)}\`))},runSchedule:E=>j("POST",U(\`/schedules/\${encodeURIComponent(E)}/run\`),{body:{}}),session:E=>j("GET",U(\`/sessions/\${encodeURIComponent(E)}\`)),setPhase:(E,M)=>j("POST",U(\`/sessions/\${encodeURIComponent(E)}/phase\`),{body:{phase:M}}),approve:async(E,M)=>{await j("POST",U(\`/approvals/\${encodeURIComponent(E)}\`),{body:{granted:M}})},stop:E=>j("POST",U("/stop"),{body:E===void 0?{}:{reason:E}}),start:()=>j("POST",U("/start"),{body:{}}),context:E=>{const M=new URLSearchParams;E?.sessionKey!==void 0&&M.set("sessionKey",E.sessionKey),E?.input!==void 0&&M.set("input",E.input);const k=M.size===0?"":\`?\${M.toString()}\`;return j("GET",U(\`/context\${k}\`))}}}return{agent:q,agents:()=>j("GET","/v1/agents"),health:()=>j("GET","/v1/health"),async ready(){try{return await x("GET","/v1/ready"),!0}catch(S){if(S instanceof Ge&&S.status===503)return!1;throw S}},provision:()=>j("GET","/v1/provision"),keys:()=>j("GET","/v1/keys"),createKey:S=>j("POST","/v1/keys",{body:S}),revokeKey:S=>j("DELETE",\`/v1/keys/\${encodeURIComponent(S)}\`),createAgent:S=>j("POST","/v1/agents",{body:{answers:S}}),async*events(S){const U=new URLSearchParams;S?.agentId!==void 0&&U.set("agentId",S.agentId),S?.types!==void 0&&S.types.length>0&&U.set("types",S.types.join(",")),S?.chunks===!0&&U.set("chunks","true");const E=U.size===0?"":\`?\${U.toString()}\`,M=await D(\`/v1/events\${E}\`,S?.signal);yield*em(M)}}}function nm(c){return d.jsxs(d.Fragment,{children:[c.state.truncated?d.jsx("p",{className:"row note bad",children:"This turn produced more than the server keeps for a reattach, so the beginning of the reply is missing. The stored turn has all of it."}):null,c.state.rows.map(s=>d.jsx(um,{row:s,onAnswer:c.onAnswer},s.id)),c.state.liveReasoning===""?null:d.jsx(th,{label:"thinking",text:c.state.liveReasoning,open:!0}),c.state.live===""?null:d.jsx("p",{className:"row",children:c.state.live})]})}function um(c){const s=c.row;switch(s.kind){case"user":return d.jsx("p",{className:"row user",children:s.text});case"reply":return d.jsx("p",{className:"row",children:s.text});case"reasoning":return d.jsx(th,{label:"thinking",text:s.text});case"tool":return d.jsxs("div",{className:\`row tool\${s.ok===!1?" failed":""}\`,children:[d.jsx("span",{className:"slug",children:s.slug}),s.mutating?d.jsx("span",{className:"mut",children:" changes things"}):null,d.jsx("span",{className:"out",children:im(s)}),s.untrusted===!0?d.jsx("div",{className:"fence",children:d.jsx("div",{className:"why",children:"this result came from outside the agent — treated as data, and mutating tools are blocked for the rest of the turn"})}):null]});case"approval":return d.jsxs("div",{className:"row ask",children:[d.jsxs("div",{children:[d.jsx("strong",{children:s.slug})," needs permission — ",s.reason]}),s.match===void 0?null:d.jsx("div",{className:"what",children:s.match}),s.settled===void 0?d.jsxs("div",{className:"buttons",children:[d.jsx("button",{type:"button",className:"primary",onClick:()=>c.onAnswer(s.approvalId,!0),children:"Allow once"}),d.jsx("button",{type:"button",onClick:()=>c.onAnswer(s.approvalId,!1),children:"Refuse"})]}):d.jsx("div",{className:"settled",children:cm(s.settled)})]});case"note":return d.jsx("p",{className:\`row note\${s.bad?" bad":""}\`,children:s.text})}}function im(c){if(c.ok===void 0)return" running…";const s=c.bytes===void 0?"":\` · \${c.bytes} bytes\`,h=c.truncated===!0?" · truncated to fit the observation budget":"",o=c.latencyMs===void 0?"":\` · \${c.latencyMs} ms\`;return\`\${c.ok?" ok":" failed"}\${s}\${o}\${h}\`}function cm(c){switch(c){case"granted":return"Allowed — the call ran.";case"denied":return"Refused. The model was told a person declined it.";case"abandoned":return"The turn ended while this was waiting, so the call did not run. Nobody declined it.";case"error":return"The approver itself failed, so the call was refused. That says nothing about what anybody wanted."}}function th(c){return d.jsxs("details",{className:"row fold",open:c.open===!0,children:[d.jsxs("summary",{children:[c.label," · ",c.text.length," chars"]}),d.jsx("div",{className:"body",children:c.text})]})}function fm(c){const s=L.useRef(null);return L.useEffect(()=>{const h=s.current;h!==null&&(h.style.height="auto",h.style.height=\`\${Math.min(h.scrollHeight,190)}px\`)},[c.value]),d.jsxs("div",{className:"composer",children:[d.jsxs("div",{className:"inner",children:[d.jsx("textarea",{ref:s,value:c.value,placeholder:"Ask the agent something",onChange:h=>c.onChange(h.target.value),onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),c.onSend())}}),c.busy?d.jsx("button",{type:"button",onClick:c.onStop,children:"Stop"}):d.jsx("button",{type:"button",className:"primary",disabled:c.value.trim()==="",onClick:c.onSend,children:"Send"})]}),d.jsx("p",{className:"hint",children:c.busy?"Running. Closing this page does not stop it — the turn is detached, and reopening reattaches.":"Enter sends · shift-enter for a new line"})]})}const Nf="dispach.key";function sm(){const c=new URL(window.location.href),s=c.searchParams.get("claim");if(!(s===null||s===""))return c.searchParams.delete("claim"),window.history.replaceState({},"",c.pathname+c.search+c.hash),s}function jf(){try{return window.localStorage.getItem(Nf)??void 0}catch{return}}function Mf(c){try{window.localStorage.setItem(Nf,c)}catch{}}function Uf(){try{window.localStorage.removeItem(Nf)}catch{}}async function eh(c,s){const h=await fetch(\`\${c}/v1/keys\`,{method:"POST",headers:{"content-type":"application/json",authorization:\`Bearer \${s}\`},body:JSON.stringify({label:om()})}),o=await h.json();if(!h.ok||typeof o.secret!="string")throw new Error(o.error?.message??\`The claim was refused (\${h.status}).\`);return o.secret}function om(){const c=navigator.userAgent;return\`\${/Firefox\\//.test(c)?"Firefox":/Edg\\//.test(c)?"Edge":/Chrome\\//.test(c)?"Chrome":/Safari\\//.test(c)?"Safari":"browser"} · \${new Date().toISOString().slice(0,10)}\`}async function dm(c){const s=sm();if(s!==void 0)try{const o=await eh(c,s);return Mf(o),{kind:"key",secret:o}}catch(o){const x=o instanceof Error?o.message:String(o);if(jf()===void 0)return{kind:"needed",because:x}}const h=jf();return h!==void 0&&await Jr(c,h)?{kind:"key",secret:h}:(h!==void 0&&Uf(),await Jr(c,void 0)?{kind:"open"}:{kind:"needed",because:h===void 0?"This server needs a credential.":"The key this browser held no longer works — it was revoked, or this is a different server."})}async function Jr(c,s){try{return await lh(c,s).agents(),!0}catch(h){if(h instanceof Ge&&h.code==="unauthorized")return!1;throw h}}function lh(c,s){return am({baseUrl:c,...s===void 0?{}:{token:s}})}function rm(c,s){const h=[c.scope?.agents===void 0?"every agent":c.scope.agents.join(", "),...c.scope?.sessions===void 0?[]:[\`sessions \${c.scope.sessions}\`],c.scope?.can===void 0?"all capabilities":c.scope.can.join("+")];return c.expiresAt!==void 0&&h.push(Date.parse(c.expiresAt)<=s?"expired":\`until \${Wu(c.expiresAt)}\`),h.join(" · ")}function hm(c){const[s,h]=L.useState([]),[o,x]=L.useState(),[j,D]=L.useState(""),[V,q]=L.useState(),[S,U]=L.useState(),E=L.useCallback((C={})=>({...C,...c.token===void 0?{}:{authorization:\`Bearer \${c.token}\`}}),[c.token]),M=L.useCallback(async()=>{try{const C=await fetch(\`\${c.baseUrl}/v1/keys\`,{headers:E()}),Tt=await C.json();if(!C.ok)throw new Error(Tt.error?.message??\`HTTP \${C.status}\`);h(Tt.keys??[]),x(Tt.scope)}catch(C){U(C instanceof Error?C.message:String(C))}},[c.baseUrl,E]);L.useEffect(()=>{M()},[M]);const k=async()=>{U(void 0);try{const C=await fetch(\`\${c.baseUrl}/v1/keys\`,{method:"POST",headers:E({"content-type":"application/json"}),body:JSON.stringify({label:j.trim()})}),Tt=await C.json();if(!C.ok||Tt.secret===void 0)throw new Error(Tt.error?.message??\`HTTP \${C.status}\`);q(Tt.secret),D(""),await M()}catch(C){U(C instanceof Error?C.message:String(C))}},ct=async C=>{if(U(void 0),!window.confirm(\`Revoke "\${C.label}"? If it is the key this browser is using, you will be signed out of this page. There is no way to tell from here — the listing carries no secrets.\`))return;const Tt=jf();try{const W=await fetch(\`\${c.baseUrl}/v1/keys/\${C.keyId}\`,{method:"DELETE",headers:E()});if(!W.ok){const It=await W.json();throw new Error(It.error?.message??\`HTTP \${W.status}\`)}if(Tt!==void 0&&!await ym(c.baseUrl,Tt)){Uf(),window.location.reload();return}await M()}catch(W){U(W instanceof Error?W.message:String(W))}};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"card",children:[d.jsx("h2",{children:"Issue a key"}),d.jsx("p",{children:"A key is shown once and never again — the server stores a hash of it, so there is no way to recover one. Label it for the browser or machine that will hold it."}),V===void 0?null:d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"secret",children:V}),d.jsxs("p",{className:"hint",style:{margin:"0 0 12px"},children:["Copy it now. This is the only time it is readable."," ",d.jsx("button",{type:"button",style:{padding:"2px 8px",fontSize:11},onClick:()=>{Mf(V),window.location.reload()},children:"use it in this browser"})]})]}),d.jsxs("div",{style:{display:"flex",gap:8},children:[d.jsx("input",{value:j,placeholder:"my laptop",onChange:C=>D(C.target.value)}),d.jsx("button",{type:"button",className:"primary",disabled:j.trim()==="",onClick:()=>void k(),children:"Issue"})]})]}),d.jsxs("div",{className:"card",children:[d.jsx("h2",{children:"Keys"}),d.jsx("p",{children:o??"…"}),S===void 0?null:d.jsx("p",{className:"note bad",children:S}),d.jsxs("table",{children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{children:"Label"}),d.jsx("th",{children:"Created"}),d.jsx("th",{children:"Reaches"}),d.jsx("th",{children:"Last used"}),d.jsx("th",{})]})}),d.jsx("tbody",{children:s.map(C=>d.jsxs("tr",{children:[d.jsx("td",{className:C.revokedAt===void 0?"":"revoked",children:C.label}),d.jsx("td",{children:Wu(C.createdAt)}),d.jsx("td",{className:"sub",children:rm(C,Date.now())}),d.jsx("td",{children:C.revokedAt!==void 0?\`revoked \${Wu(C.revokedAt)}\`:C.lastUsedAt===void 0?"never":Wu(C.lastUsedAt)}),d.jsx("td",{children:C.revokedAt===void 0?d.jsx("button",{type:"button",className:"bad",style:{padding:"2px 9px",fontSize:11},onClick:()=>void ct(C),children:"revoke"}):null})]},C.keyId))})]}),s.length===0?d.jsx("p",{className:"hint",style:{marginTop:10},children:"No keys. This server is open to anyone who can reach the port — issuing the first key is what closes it."}):null]})]})}async function ym(c,s){try{return(await fetch(\`\${c}/v1/agents\`,{headers:{authorization:\`Bearer \${s}\`}})).ok}catch{return!0}}function Wu(c){const s=new Date(c);return Number.isNaN(s.getTime())?c:s.toISOString().slice(0,10)}const vm=["chat","new","tools","schedules","channels","keys"];function mm(c){return c!==null&&vm.includes(c)}function gm(c){const s=new URL(c).searchParams,h=s.get("agent"),o=s.get("panel");return{...h===null||h===""?{}:{agentId:h},panel:mm(o)?o:"chat"}}function bm(c,s){const h=new URL(c);return s.agentId===void 0||s.agentId===""?h.searchParams.delete("agent"):h.searchParams.set("agent",s.agentId),s.panel==="chat"?h.searchParams.delete("panel"):h.searchParams.set("panel",s.panel),\`\${h.pathname}\${h.search}\`}function Sm(c){const s={};for(const h of c)s[h.step]=h.fallback;return s}const pm=8;function Tm(c,s,h){let o=s;for(let x=0;x<pm;x+=1){if(o===void 0)return!1;const j=o.requires;if(j===void 0)return!0;if(h[j.step]!==j.value)return!1;o=c.find(D=>D.step===j.step)}return!1}function Fu(c,s){return c.filter(h=>Tm(c,h,s))}function ah(c,s){return Fu(c,s).filter(h=>h.optional!==!0&&(s[h.step]??"").trim()==="")}function Em(c,s){const h={};for(const o of Fu(c,s)){const x=(s[o.step]??"").trim();x!==""&&(h[o.step]=x)}return h}function zm(c,s){return Fu(c,s).filter(h=>h.secret&&(s[h.step]??"").trim()==="")}function Am(c){return{...Mn,filter:c==="nlt"?Wv():$r()}}const Mn={filter:$r(),rows:[],live:"",liveReasoning:"",running:!1,truncated:!1};let kr=0;function ul(){return kr+=1,\`r\${kr}\`}function _m(c,s){return{...c,rows:[...c.rows,{kind:"user",id:ul(),text:s}],running:!0}}function jm(c,s){switch(s.kind){case"accepted":return c;case"replay":return s.report.truncated?{...c,truncated:!0}:c;case"ended":return{...c,running:!1,rows:[...c.rows,{kind:"note",id:ul(),text:\`This turn finished before the page attached — \${s.status}. Its reply is stored.\`,bad:s.status!=="final"}]};case"unavailable":return{...c,running:!1,rows:[...c.rows,{kind:"note",id:ul(),text:s.reason,bad:!0}]};case"event":return xm(c,s.event)}}function xm(c,s){switch(s.type){case"turn.start":return{...c,running:!0};case"model.chunk":{const h=s.data;if(h.kind==="reasoning")return{...c,liveReasoning:c.liveReasoning+h.delta};const o=c.filter.push(h.delta);return o===""?c:{...c,live:c.live+o}}case"model.result":return ku({...c,live:c.live+c.filter.endStep()});case"tool.call":{const h=s.data,o=ku(c);return{...o,rows:[...o.rows,{kind:"tool",id:ul(),callId:h.callId,slug:h.slug,mutating:h.mutating}]}}case"tool.result":{const h=s.data,o=c.rows.findIndex(D=>D.kind==="tool"&&D.callId===h.callId);if(o===-1)return c;const x=c.rows[o];if(x===void 0||x.kind!=="tool")return c;const j=[...c.rows];return j[o]={...x,ok:h.ok,bytes:h.bytes,truncated:h.truncated,latencyMs:h.latencyMs,...h.trust==="untrusted"?{untrusted:!0}:{}},{...c,rows:j}}case"approval.requested":{const h=s.data,o=ku(c);return{...o,rows:[...o.rows,{kind:"approval",id:ul(),approvalId:h.approvalId,slug:h.slug,...h.match===void 0?{}:{match:h.match},reason:h.reason}]}}case"approval.resolved":{const h=s.data,o=c.rows.findIndex(D=>D.kind==="approval"&&D.approvalId===h.approvalId);if(o===-1)return c;const x=c.rows[o];if(x===void 0||x.kind!=="approval")return c;const j=[...c.rows];return j[o]={...x,settled:h.by==="abandoned"?"abandoned":h.by==="error"?"error":h.granted?"granted":"denied"},{...c,rows:j}}case"agent.warning":{const h=s.data;return{...c,rows:[...c.rows,{kind:"note",id:ul(),text:h.message??"",bad:!1}]}}case"turn.end":{const h=s.data,o=ku({...c,live:c.live+c.filter.end()}),x=Qv(h.reason,{steps:h.steps});return{...o,running:!1,rows:x===void 0?o.rows:[...o.rows,{kind:"note",id:ul(),text:x,bad:Xv(h.reason)}]}}default:return c}}function ku(c){if(c.live===""&&c.liveReasoning==="")return c;const s=[...c.rows],h=c.liveReasoning.trim();h!==""&&s.push({kind:"reasoning",id:ul(),text:h});const o=c.live.trim();return o!==""&&s.push({kind:"reply",id:ul(),text:o}),{...c,rows:s,live:"",liveReasoning:""}}function Om(c){if(!c.available)return d.jsxs("p",{className:"empty",children:["This server has no provisioner, so it cannot create an agent — the case for an embedder mounting the API over its own agent store. Run ",d.jsx("code",{children:"dispach init"})," ","where the sandbox is, or mount an agent directory."]});if(!c.local)return d.jsxs("p",{className:"empty",children:["Creating an agent is allowed only on a loopback bind, and this server is reachable from elsewhere. That is also what refuses it inside the container, whose"," ",d.jsx("code",{children:"CMD"})," binds ",d.jsx("code",{children:"0.0.0.0"}),": mount a written agent at"," ",d.jsx("code",{children:"/agent"}),", or run ",d.jsx("code",{children:"dispach init"})," on the host."]})}function Nm(c){const{step:s,value:h}=c,o=\`provision-\${s.step}\`;return d.jsxs("div",{className:c.invalid?"field invalid":"field",children:[d.jsxs("label",{htmlFor:o,children:[s.prompt,s.optional?d.jsx("span",{className:"sub",children:" optional"}):null,s.secret?d.jsx("span",{className:"sub",children:" · written to .env, never read back"}):null]}),s.choices===void 0?d.jsx("input",{id:o,name:s.step,type:s.secret?"password":"text",value:h,disabled:c.disabled,autoComplete:s.secret?"new-password":"off",spellCheck:!1,onChange:x=>c.onChange(x.target.value)}):d.jsx("select",{id:o,name:s.step,value:h,disabled:c.disabled,onChange:x=>c.onChange(x.target.value),children:s.choices.map(x=>d.jsx("option",{value:x.value,children:x.hint===void 0?x.label:\`\${x.label} — \${x.hint}\`},x.value))}),c.invalid?d.jsx("div",{className:"sub error",children:"needs an answer"}):null]})}function Mm(c){const s=c.result.adopted.includes(c.result.id);return d.jsxs("div",{className:"created",children:[d.jsxs("h3",{children:["Created ",d.jsx("code",{children:c.result.id})]}),d.jsxs("p",{children:[d.jsx("code",{children:c.result.dir}),d.jsxs("span",{className:"sub",children:[" · ",c.result.files.length," files"]})]}),s?d.jsx("p",{className:"ok",children:"adopted · live on this host, with its channels and schedules"}):d.jsxs("p",{className:"error",children:["written, and ",d.jsx("strong",{children:"not running"}),c.result.error===void 0?null:d.jsxs(d.Fragment,{children:[": ",c.result.error.message,c.result.error.hint===void 0?null:d.jsxs("span",{className:"sub",children:[" ",c.result.error.hint]})]})]}),c.blank.length===0?null:d.jsxs("div",{className:"blank-secrets",children:[d.jsxs("p",{children:["Left empty, and needed before this works:"," ",c.blank.map(h=>h.prompt).join(", "),"."]}),d.jsxs("p",{className:"sub",children:["Fill them in ",d.jsxs("code",{children:[c.result.dir,"/.env"]})," at a terminal —"," ",d.jsx("code",{children:".env"})," is a protected path, so neither the agent nor this API can write it. The file names each variable in its own comments."]})]}),s?d.jsxs("button",{type:"button",onClick:()=>c.onOpen(c.result.id),children:["open ",c.result.id]}):null]})}function Um(c){if(c.result!==void 0)return d.jsx(Mm,{result:c.result,blank:zm(c.offer.steps,c.answers),onOpen:c.onOpen});const s=Om(c.offer);if(s!==void 0)return s;const h=Fu(c.offer.steps,c.answers),o=ah(c.offer.steps,c.answers),x=new Set(o.map(j=>j.step));return d.jsxs("form",{className:"provision",onSubmit:j=>{j.preventDefault(),c.onSubmit()},children:[d.jsxs("p",{className:"sub",children:["The same questions ",d.jsx("code",{children:"dispach init"})," asks, served from the same walk. What you leave alone takes its default. The agent is adopted into this server as it is created — there is no second command."]}),h.map(j=>d.jsx(Nm,{step:j,value:c.answers[j.step]??"",invalid:c.touched&&x.has(j.step),disabled:c.busy,onChange:D=>c.onAnswer(j.step,D)},j.step)),c.error===void 0?null:d.jsx("p",{className:"error",children:c.error}),d.jsx("button",{type:"submit",disabled:c.busy,children:c.busy?"creating…":"create agent"}),c.touched&&o.length>0?d.jsxs("p",{className:"sub error",children:[o.map(j=>j.prompt).join(", ")," — still needed."]}):null]})}function Dm(c){return c.agents.length===0?d.jsx("div",{className:"empty",style:{fontSize:12,padding:"4px 8px"},children:"no agents on this server"}):d.jsx(d.Fragment,{children:c.agents.map(s=>{const h=s.status==="disabled";return d.jsxs("div",{className:"agent-row",children:[d.jsxs("button",{type:"button",className:"row-button","aria-current":s.id===c.current,disabled:h,onClick:()=>c.onSelect(s.id),children:[s.name,h?d.jsx("span",{className:"agent-off",children:" · stopped"}):null]}),h?d.jsxs("div",{className:"agent-note",children:[s.reason??"switched off",d.jsx("button",{type:"button",className:"link",disabled:c.starting===s.id,onClick:()=>c.onStart(s.id),children:c.starting===s.id?"starting…":"start"})]}):null]},s.id)})})}function Cm(c){return c.tools.length===0?d.jsxs("p",{className:"empty",children:["No tools are pinned. An agent with none can still hold a conversation; a manifest's"," ",d.jsx("code",{children:"tools.pinned"})," is what grants the rest."]}):d.jsxs("table",{className:"panel-table",children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{children:"tool"}),d.jsx("th",{children:"provider"}),d.jsx("th",{children:"writes"}),d.jsx("th",{children:"trust"})]})}),d.jsx("tbody",{children:c.tools.map(s=>d.jsxs("tr",{children:[d.jsxs("td",{children:[d.jsx("code",{children:s.slug}),d.jsx("div",{className:"sub",children:s.summary})]}),d.jsx("td",{children:s.provider}),d.jsx("td",{children:s.mutating?"yes":"no"}),d.jsxs("td",{children:[s.trust,s.trustReason===void 0?null:d.jsx("div",{className:"sub",children:s.trustReason})]})]},s.slug))})]})}function Rm(c){return c.schedules.length===0?d.jsxs("p",{className:"empty",children:["No schedules. A manifest's ",d.jsx("code",{children:"schedules:"})," block declares them."]}):d.jsxs("table",{className:"panel-table",children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{children:"schedule"}),d.jsx("th",{children:"when"}),d.jsx("th",{children:"next"}),d.jsx("th",{children:"delivers to"})]})}),d.jsx("tbody",{children:c.schedules.map(s=>d.jsxs("tr",{className:s.enabled?"":"off",children:[d.jsxs("td",{children:[d.jsx("code",{children:s.id}),d.jsx("div",{className:"sub",children:s.task})]}),d.jsxs("td",{children:[s.kind," ",s.expr,s.timezone===void 0?null:d.jsx("div",{className:"sub",children:s.timezone})]}),d.jsx("td",{children:s.enabled?s.nextRunAt??"never again — a spent one-shot":"disabled"}),d.jsx("td",{children:s.deliverChannel===void 0?"this session only":\`\${s.deliverChannel}\${s.deliverTo===void 0?"":\` → \${s.deliverTo}\`}\`})]},s.id))})]})}function Hm(c){return c.channels.length===0?d.jsx("p",{className:"empty",children:"No channels. This agent is reached through this page and the HTTP API only."}):d.jsx("div",{className:"channels",children:c.channels.map(s=>{const h=s.input,o=h?.expiresAt!==void 0&&Date.parse(h.expiresAt)<=c.now;return d.jsxs("section",{className:"channel",children:[d.jsxs("h3",{children:[d.jsx("code",{children:s.id})," ",d.jsx("span",{className:"sub",children:s.type})]}),d.jsxs("p",{className:\`status status-\${s.status}\`,children:[s.status,s.detail===void 0?null:\` — \${s.detail}\`]}),h===void 0?null:d.jsxs("div",{className:\`channel-input \${o?"stale":"fresh"}\`,children:[o?d.jsx("p",{className:"warn",children:"this expired — the channel will issue another"}):null,d.jsx("pre",{className:"payload","data-kind":h.kind,children:h.payload}),d.jsxs("p",{className:"sub",children:[h.kind," · issued ",h.issuedAt,h.expiresAt===void 0?" · no expiry reported":\` · expires \${h.expiresAt}\`]})]})]},s.id)})})}const qm=[{panel:"tools",label:"tools"},{panel:"schedules",label:"schedules"},{panel:"channels",label:"channels"},{panel:"keys",label:"keys"}],zf="dispach.turn";function Bm(c){const[s,h]=L.useState(),[o,x]=L.useState();return L.useEffect(()=>{dm(c.baseUrl).then(h).catch(j=>x(j instanceof Error?j.message:String(j)))},[c.baseUrl]),o!==void 0?d.jsxs(xf,{title:"Cannot reach the server",children:[d.jsx("p",{children:o}),d.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"Try again"})]}):s===void 0?d.jsx(xf,{title:"Connecting…"}):s.kind==="needed"?d.jsx(Ym,{baseUrl:c.baseUrl,because:s.because}):d.jsx(wm,{baseUrl:c.baseUrl,token:s.kind==="key"?s.secret:void 0})}function xf(c){return d.jsx("div",{className:"gate",children:d.jsxs("div",{className:"card",children:[d.jsx("h2",{children:c.title}),c.children]})})}function Ym(c){const[s,h]=L.useState(""),[o,x]=L.useState(),[j,D]=L.useState(!1),V=async q=>{D(!0),x(void 0);try{const S=q?await eh(c.baseUrl,s.trim()):s.trim();Mf(S),window.location.reload()}catch(S){x(S instanceof Error?S.message:String(S)),D(!1)}};return d.jsxs(xf,{title:"This server needs a credential",children:[d.jsx("p",{children:c.because}),d.jsx("input",{value:s,placeholder:"paste a claim or an operator key",onChange:q=>h(q.target.value)}),d.jsxs("p",{className:"hint",style:{margin:"8px 0 12px"},children:[d.jsx("code",{children:"dispach serve"})," prints a one-time claim at boot while no key exists. A claim is exchanged for a key this browser keeps; a key is used directly."]}),d.jsx("div",{className:"ask",children:d.jsxs("div",{className:"buttons",children:[d.jsx("button",{type:"button",className:"primary",disabled:j||s.trim()==="",onClick:()=>V(!0),children:"Exchange a claim"}),d.jsx("button",{type:"button",disabled:j||s.trim()==="",onClick:()=>V(!1),children:"Use as a key"})]})}),o===void 0?null:d.jsx("p",{className:"note bad",style:{marginTop:12},children:o})]})}const Af=c=>c instanceof Ge&&c.status===404,Gm={new:"New agent",tools:"Tools",schedules:"Schedules",channels:"Channels",keys:"Operator keys"};function wm(c){const s=L.useRef(lh(c.baseUrl,c.token)),[h,o]=L.useState([]),[x,j]=L.useState(),[D,V]=L.useState(),[q,S]=L.useState(),[U,E]=L.useState([]),M=L.useCallback(async()=>{j(void 0),V(void 0),E([]),vt("this agent is no longer running on this server — start it from the list");try{o(await s.current.agents())}catch{}},[]),[k,ct]=L.useState([]),[C,Tt]=L.useState(),[W,It]=L.useState(()=>gm(window.location.href).panel),[Ot,Nt]=L.useState(Mn),[fe,Yt]=L.useState(""),[F,vt]=L.useState(),Pt=L.useRef(void 0);L.useEffect(()=>{const B=new URL(window.location.href).searchParams.get("agent")??void 0;s.current.agents().then(K=>{o(K);const xt=K.filter(se=>se.status!=="disabled"),zt=xt.find(se=>se.id===B)??xt[0];if(zt===void 0){new URL(window.location.href).searchParams.get("panel")===null&&It("new");return}j(zt.id),V(zt.name),Nt(se=>({...se,filter:Am(zt.dialect??"nlt").filter})),document.title=\`\${zt.name} · Dispach\`}).catch(K=>vt(Ye(K)))},[]);const St=x===void 0?void 0:s.current.agent(x),Wt=L.useCallback(async()=>{if(St!==void 0)try{ct(await St.sessions())}catch(B){Af(B)?M():vt(Ye(B))}},[St,M]);L.useEffect(()=>{Wt()},[Wt]);const wt=L.useCallback(async(B,K)=>{const xt=K.turn(B);Pt.current=()=>xt.stop();try{sessionStorage.setItem(zf,B);for await(const zt of xt.stream({chunks:!0}))Nt(se=>jm(se,zt))}catch(zt){vt(Ye(zt)),Nt(se=>({...se,running:!1}))}finally{sessionStorage.removeItem(zf),Pt.current=void 0,Wt()}},[Wt]);L.useEffect(()=>{if(St===void 0)return;const B=sessionStorage.getItem(zf);B!==null&&(Nt(K=>({...K,running:!0})),wt(B,St))},[St,wt]),L.useEffect(()=>{if(St===void 0)return;let B=!0;const K=()=>{St.approvals().then(zt=>{B&&E(zt)}).catch(zt=>{B&&Af(zt)&&M()})};K();const xt=window.setInterval(K,5e3);return()=>{B=!1,window.clearInterval(xt)}},[St,M]);const we=async()=>{const B=fe.trim();if(!(B===""||St===void 0)){Yt(""),vt(void 0),Nt(K=>_m(K,B));try{const K=await St.send(B,{...C===void 0?{}:{sessionKey:C}});C===void 0&&Tt(K.sessionKey),await wt(K.turnId,St)}catch(K){vt(Ye(K)),Nt(xt=>({...xt,running:!1}))}}},Me=async(B,K)=>{if(St!==void 0)try{await St.approve(B,K)}catch(xt){xt instanceof Ge&&xt.code==="approval_not_found"||vt(Ye(xt))}},te=async B=>{if(It("chat"),Tt(B),Nt(Mn),Yt(""),!(B===void 0||St===void 0))try{const K=await Qm(c.baseUrl,c.token,x??"",B);Nt({...Mn,rows:K})}catch(K){vt(Ye(K))}},[z,R]=L.useState({tools:[],schedules:[],channels:[]});L.useEffect(()=>{if(St===void 0||W!=="tools"&&W!=="schedules"&&W!=="channels")return;let B=!1;return(async()=>{try{const[K,xt,zt]=await Promise.all([St.tools(),St.schedules(),St.describe()]);if(B)return;R({tools:K,schedules:xt,channels:zt.channels??[]})}catch(K){if(B)return;Af(K)?M():vt(Ye(K))}})(),()=>{B=!0}},[St,W,M]);const[X,dt]=L.useState(),[ft,v]=L.useState({}),[N,H]=L.useState(!1),[G,J]=L.useState(!1),[tt,it]=L.useState();L.useEffect(()=>{if(W!=="new"||X!==void 0)return;let B=!1;return(async()=>{try{const K=await s.current.provision();if(B)return;dt(K),v(Sm(K.steps))}catch(K){B||vt(Ye(K))}})(),()=>{B=!0}},[W,X]);const Zt=L.useCallback(async()=>{if(X!==void 0&&(H(!0),!(ah(X.steps,ft).length>0))){J(!0),vt(void 0);try{const B=await s.current.createAgent(Em(X.steps,ft));it(B),o(await s.current.agents())}catch(B){vt(Ye(B))}finally{J(!1)}}},[X,ft]),Et=L.useCallback(B=>{const K=B.panel??W,xt=B.agentId??x;It(K),B.agentId!==void 0&&B.agentId!==x&&(j(B.agentId),V(h.find(zt=>zt.id===B.agentId)?.name),Tt(void 0),Nt(Mn),Yt("")),window.history.replaceState(null,"",bm(window.location.href,{...xt===void 0?{}:{agentId:xt},panel:K}))},[x,h,W]),Ul=L.useCallback(async B=>{S(B);try{await s.current.agent(B).start(),o(await s.current.agents())}catch(K){vt(Ye(K))}finally{S(void 0)}},[]);return d.jsxs("div",{className:"shell",children:[d.jsxs("aside",{className:"side",children:[d.jsxs("header",{children:[d.jsx("div",{className:"brand",children:"Dispach"}),d.jsx("div",{style:{fontSize:12,color:"var(--dim)"},children:D??"…"})]}),d.jsxs("nav",{children:[h.length>1||h.some(B=>B.status==="disabled")?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"group",children:"Agents"}),d.jsx(Dm,{agents:h,current:x,onSelect:B=>Et({agentId:B}),onStart:B=>void Ul(B),...q===void 0?{}:{starting:q}})]}):null,d.jsx("div",{className:"group",children:"Conversation"}),d.jsx("button",{type:"button",className:"row-button","aria-current":W==="chat"&&C===void 0,onClick:()=>void te(void 0),children:"+ new"}),k.map(B=>d.jsx("button",{type:"button",className:"row-button","aria-current":W==="chat"&&C===B.sessionKey,onClick:()=>void te(B.sessionKey),children:B.sessionKey},B.sessionKey)),d.jsx("div",{className:"group",children:"Server"}),d.jsx("button",{type:"button",className:"row-button","aria-current":W==="new",onClick:()=>Et({panel:"new"}),children:"+ new agent"}),qm.map(B=>d.jsx("button",{type:"button",className:"row-button","aria-current":W===B.panel,onClick:()=>Et({panel:B.panel}),children:B.label},B.panel))]}),d.jsxs("footer",{children:[d.jsx("span",{className:\`dot \${Ot.running?"busy":"live"}\`}),d.jsx("span",{style:{fontSize:11,color:"var(--dim)"},children:Ot.running?"working":"ready"}),c.token===void 0?d.jsx("span",{style:{fontSize:11,color:"var(--warn)",marginLeft:"auto"},children:"unauthenticated"}):d.jsx("button",{type:"button",style:{marginLeft:"auto",padding:"3px 8px",fontSize:11},onClick:()=>{Uf(),window.location.reload()},children:"forget key"})]})]}),d.jsxs("main",{className:"main",children:[d.jsxs("div",{className:"bar",children:[d.jsx("strong",{children:W==="chat"?D??"":Gm[W]}),W==="chat"?d.jsx("span",{children:C??"new conversation"}):null,d.jsx("span",{className:"spacer"}),U.length>0?d.jsxs("span",{style:{color:"var(--warn)"},children:[U.length," waiting on you"]}):null]}),W!=="chat"?d.jsx("div",{className:"scroll",children:d.jsxs("div",{className:"pad",children:[F===void 0?null:d.jsx("p",{className:"row note bad",children:F}),W==="new"?X===void 0?d.jsx("p",{className:"empty",children:"reading this server's questions…"}):d.jsx(Um,{offer:X,answers:ft,busy:G,touched:N,...F===void 0?{}:{error:F},...tt===void 0?{}:{result:tt},onAnswer:(B,K)=>v(xt=>({...xt,[B]:K})),onSubmit:()=>void Zt(),onOpen:B=>{it(void 0),dt(void 0),H(!1),Et({agentId:B,panel:"chat"})}}):null,W==="keys"?d.jsx(hm,{client:s.current,baseUrl:c.baseUrl,token:c.token}):null,W==="tools"?d.jsx(Cm,{tools:z.tools}):null,W==="schedules"?d.jsx(Rm,{schedules:z.schedules}):null,W==="channels"?d.jsx(Hm,{channels:z.channels,now:Date.now()}):null]})}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"scroll",children:d.jsxs("div",{className:"pad",children:[F===void 0?null:d.jsx("p",{className:"row note bad",children:F}),d.jsx(nm,{state:Ot,onAnswer:(B,K)=>void Me(B,K)}),d.jsx(Xm,{state:Ot})]})}),d.jsx(fm,{value:fe,busy:Ot.running,onChange:Yt,onSend:()=>void we(),onStop:()=>void Pt.current?.()})]})]})]})}function Xm(c){const s=L.useRef(null),h=c.state.rows.length+c.state.live.length;return L.useEffect(()=>{const o=s.current,x=o?.closest(".scroll");if(o===null||x===null||x===void 0)return;x.scrollHeight-x.scrollTop-x.clientHeight<40&&o.scrollIntoView({block:"end"})},[h]),d.jsx("div",{ref:s})}async function Qm(c,s,h,o){const x=await fetch(\`\${c}/v1/agents/\${h}/sessions/\${encodeURIComponent(o)}/messages?limit=200\`,{headers:s===void 0?{}:{authorization:\`Bearer \${s}\`}});return x.ok?((await x.json()).messages??[]).filter(D=>D.origin===void 0&&(D.role==="user"||D.role==="assistant")&&(D.content??"")!=="").map((D,V)=>({kind:D.role==="user"?"user":"reply",id:\`h\${V}\`,text:D.content??""})):[]}function Ye(c){return c instanceof Ge?c.hint===""?c.message:\`\${c.message} — \${c.hint}\`:c instanceof Error?c.message:String(c)}const nh=document.getElementById("root");if(nh===null)throw new Error("no #root in the document");Bv.createRoot(nh).render(d.jsx(L.StrictMode,{children:d.jsx(Bm,{baseUrl:window.location.origin})}));
26
- `;var at=`<!doctype html>
27
- <html lang="en">
28
- <head>
29
- <meta charset="utf-8" />
30
- <meta name="viewport" content="width=device-width, initial-scale=1" />
31
- <!--
32
- An inline SVG data URI rather than a file, and that is a constraint rather than a
33
- flourish: the server embeds these assets as *text* (decision 11.200), so a binary
34
- favicon would be the one thing in the build that could not ride inside the bundle.
35
- -->
36
- <link
37
- rel="icon"
38
- href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%230b0b0c'/%3E%3Cpath d='M9 8h7a8 8 0 0 1 0 16H9z' fill='none' stroke='%23e8e6e3' stroke-width='2.5'/%3E%3C/svg%3E"
39
- />
40
- <title>Dispach</title>
41
- <!--
42
- No title text beyond the brand. The page sets \`document.title\` from the agent it is
43
- actually talking to once it knows, because a tab saying "Dispach" next to three others
44
- saying "Dispach" is a tab nobody can find.
45
- -->
46
- <script type="module" crossorigin src="./assets/app.js"></script>
47
- <link rel="stylesheet" crossorigin href="./assets/app.css">
48
- </head>
49
- <body>
50
- <div id="root"></div>
51
- </body>
52
- </html>
53
- `;function rt(t){let e=2166136261;for(let n=0;n<t.length;n+=1)e^=t.charCodeAt(n),e=Math.imul(e,16777619)>>>0;return`"${e.toString(36)}-${t.length.toString(36)}"`}function te(t,e){return{body:t,contentType:e,etag:rt(t)}}var Ie={"/":te(at,"text/html; charset=utf-8"),"/assets/app.js":te(nt,"text/javascript; charset=utf-8"),"/assets/app.css":te(tt,"text/css; charset=utf-8")},lt=Object.keys(Ie);function it(t,e){let n=Ie[t];if(n===void 0)return;let u={"content-type":n.contentType,etag:n.etag,"cache-control":"no-cache"};if(e.headers.get("if-none-match")===n.etag)return new Response(null,{status:304,headers:u});return new Response(n.body,{status:200,headers:u})}var Q=1e6,he=256,ot=128,ae=255,st=`<!doctype html>
54
- <html lang="en">
55
- <head>
56
- <meta charset="utf-8">
57
- <meta name="viewport" content="width=device-width, initial-scale=1">
58
- <title>Dispach API</title>
59
- </head>
60
- <body style="margin:0">
61
- <noscript style="display:block;font:14px/1.5 system-ui;padding:2rem;max-width:40rem">
62
- <h1 style="font-size:1rem">This page needs JavaScript and a network</h1>
63
- <p>It loads the reference viewer from a CDN. The document itself is served locally and needs
64
- neither: <a href="/v1/openapi.json">/v1/openapi.json</a>.</p>
65
- </noscript>
66
- <div id="app"></div>
67
- <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
68
- <script>
69
- Scalar.createApiReference('#app', { url: '/v1/openapi.json', theme: 'default' })
70
- </script>
71
- </body>
72
- </html>
73
- `;function ut(t){let{runtime:e}=t,n=t.token,u=t.now??(()=>Date.now()),s=u();if(n===void 0&&t.allowUnauthenticated!==!0)throw new j({code:"server_token_missing",message:"createHandler was called with no token and no allowUnauthenticated.",hint:"Pass token, or pass allowUnauthenticated: true to state that this handler is mounted somewhere already protected. Defaulting to open would make the safe configuration the one you have to remember."});let f=t.running??new Map,m=t.approvals??sr(),x=()=>t.origin!==void 0&&Y(t.origin.host),A=(o)=>{if(t.origin===void 0)return;let l=ie(o,t.origin);return l===void 0?void 0:S(l,403)},C=(o,l)=>{if(t.origin===void 0)return l;let c=Ye(o,t.origin);if(Object.keys(c).length===0)return l;let d=new Headers(l.headers);for(let[p,w]of Object.entries(c))d.set(p,w);return new Response(l.body,{status:l.status,statusText:l.statusText,headers:d})},y=!1,P=async()=>{if(n!==void 0||y)return!0;return y=await e.store.operatorKeys.liveCount()>0,y},T=async(o,l,c)=>{if(ct(l)||!await P())return{kind:"open"};let d=await $e({request:o,expected:n,keys:e.store.operatorKeys,claim:t.claim,pathname:l,at:u()});if(d instanceof Response)return d;if(d.kind==="claim")return d;if(c!=="open"&&!Je(d,c))return Le(c,`${o.method} ${l}`);return d},v=new Oe;return v.add("GET","/v1/health",()=>E({status:"ok",version:Bt,uptimeMs:u()-s,agents:e.list().length}),{capability:"open"}),v.add("GET","/v1/ready",()=>{if(e.ready)return E({status:"ready",agents:e.list().length});return E({status:"starting",agents:e.list().length},503)},{capability:"open"}),v.add("GET","/v1/agents",async(o)=>{let l=e.list().map((p)=>ye(e,p)),c=new Set(l.map((p)=>p.id)),d=(await e.store.agentState.list()).filter((p)=>!p.enabled&&!c.has(p.agentId)).map((p)=>({id:p.agentId,name:p.agentId,status:"disabled",...p.reason===void 0?{}:{reason:p.reason},...p.disabledAt===void 0?{}:{disabledAt:p.disabledAt}}));return E(pt(o.principal,[...l,...d]))},{capability:"read"}),v.add("GET","/v1/agents/:id",(o)=>O(e,o,async(l)=>{let c=await l.store.schedules.list(l.id),d=e.team(l.id);return E({...ye(e,l),dialect:l.describe().dialect,window:l.window,tools:l.tools.size,catalogueTokens:l.describe().catalogueTokens,skills:l.skills?.skills.length??0,schedules:c.length,...d.length===0?{}:{team:d.map((p)=>({id:p.id,task:p.task,artifact:Object.keys(p.artifact.properties)}))},warnings:[...l.warnings,...l.tools.warnings]})}),{capability:"read"}),v.add("POST","/v1/agents/:id/reload",(o)=>O(e,o,async(l)=>{try{let c=await e.replace(l.id);return E({id:l.id,status:"loaded",adopted:c.map((d)=>d.id)})}catch(c){if(ke(c))return S({code:c.code,message:c.message,hint:c.hint,...c.field===void 0?{}:{field:c.field}},c.code==="agent_turn_in_flight"?409:400);throw c}}),{capability:"admin"}),v.add("GET","/v1/openapi.json",(o)=>E(Ve({routes:v.routes(),serverUrl:`${o.url.protocol}//${o.url.host}`})),{capability:"open"}),v.add("GET","/docs",()=>new Response(st,{status:200,headers:{"content-type":"text/html; charset=utf-8"}}),{capability:"open"}),v.add("GET","/v1/provision",()=>E({available:t.provision!==void 0,local:x(),steps:t.provision?.steps()??[]}),{capability:"read"}),v.add("POST","/v1/agents",async(o)=>{let l=t.provision;if(l===void 0)return S({code:"provisioning_not_supported",message:"This server cannot create agents.",hint:"Creating one writes a directory of files from a question set this process was not given — an embedder mounting this handler over its own agent store is the case that lands here. Run `init` where the sandbox is, or mount an agent directory."},501);if(!x())return S({code:"provisioning_not_local",message:"Creating an agent is only allowed on a loopback bind.",hint:"This route writes files and starts an agent, and a token-less loopback server is a supported configuration — so it is gated on the bind rather than on a credential. This is also what refuses provisioning inside the container, whose CMD binds 0.0.0.0: mount a written agent at /agent, or run `init` on the host. A scoped admin key will open this on a public bind."},403);let c=await U(o.request);if(c.kind==="error")return S(c.error,400);let d=K(ze,c.value);if(!d.ok)return S(d.error,400);let p=d.value.answers,w;try{w=l.create(p)}catch(b){if(ke(b))return S(b.toDetail(),400);throw b}try{let b=await e.adopt(w.manifestPath);return E({id:w.agentId,dir:w.dir,files:w.files,adopted:b.map((z)=>z.id)},201)}catch(b){return E({id:w.agentId,dir:w.dir,files:w.files,adopted:[],error:ke(b)?b.toDetail():{code:"provision_adopt_failed",message:b instanceof Error?b.message:String(b),hint:"The agent was written and is not running. Fix what the message names and `start` it, or restart the host."}},201)}},{capability:"admin"}),v.add("POST","/v1/agents/:id/stop",async(o)=>{let l=o.params.id??"",c=e.list().some((_)=>_.id===l),d=await e.store.agentState.get(l);if(!c&&d===void 0)return R("agent",l);let p=await U(o.request);if(p.kind==="error")return S(p.error,400);let w=K(Ne,p.value);if(!w.ok)return S(w.error,400);let b=w.value.reason?.trim(),z=await e.store.agentState.disable(l,new Date(t.now?.()??Date.now()).toISOString(),b===void 0||b===""?void 0:b);if(c)try{await e.dispose(l,"stopped")}catch(_){if(ke(_)&&_.code==="agent_turn_in_flight")return S(_.toDetail(),409);throw _}return E({id:l,status:"disabled",...le(z)})},{capability:"admin"}),v.add("POST","/v1/agents/:id/start",async(o)=>{let l=o.params.id??"";if(e.list().some((w)=>w.id===l)){let w=await e.store.agentState.enable(l);return E({id:l,status:"loaded",...le(w)})}let c=t.resolveAgent;if(c===void 0)return S({code:"start_not_supported",message:"This server cannot look up a manifest for an agent it is not hosting.",hint:"Starting a stopped agent needs its manifest, which lives wherever agents live — the sandbox for the CLI, a mounted path for a container. This process was built without that lookup, so pass the agent to `serve` and restart it instead."},501);let d=c(l);if(d===void 0)return R("agent",l);let p=await e.store.agentState.enable(l);try{let w=await e.adopt(d);return E({id:l,status:"loaded",...le(p),adopted:w.map((b)=>b.id)})}catch(w){if(await e.store.agentState.disable(l,new Date(t.now?.()??Date.now()).toISOString(),"start failed"),ke(w))return S(w.toDetail(),400);throw w}},{capability:"admin"}),v.add("POST","/v1/agents/:id/messages",async(o)=>O(e,o,async(l)=>{let c=await U(o.request);if(c.kind==="error")return S(c.error,400);let d=K(Se,c.value);if(!d.ok)return S(d.error,400);let p=d.value,w=p.chunks===!0,b=p.text,z=p.sessionKey??"api:default",_=V(o,z);if(_!==void 0)return _;let I=vt(p.deliver);if(I.kind==="error")return S(I.error,400);let G=mt(p.from);if(G.kind==="error")return S(G.error,400);let F=gt(o.request);if(F.kind==="error")return S(F.error,400);let L=Kt();if(F.key!==void 0){let B=await l.store.turns.claimInboundKey({agentId:l.id,key:F.key,turnId:L,inputHash:await yt(z,b),now:new Date});if(B.kind==="replay")return E({turnId:B.turnId,sessionKey:z,replayed:!0},200);if(B.kind==="mismatch")return S({code:"idempotency_key_reused",message:`Idempotency-Key "${F.key}" was already used for a different message.`,hint:`It belongs to turn ${B.turnId}, whose text or session differed from this request's. Nothing was run. Use a fresh key for a new message, or resend the original text byte for byte to get that turn back. A key is remembered for 24 hours.`,field:"Idempotency-Key"},409)}let M=new AbortController;f.set(L,M),e.streams.open(L,{chunks:w});let Et=l.send(b,{sessionKey:z,turnId:L,source:"api",...G.from===void 0?{}:{from:G.from},signal:M.signal}).then(async(B)=>{if(I.target===void 0||B.text.trim()==="")return;await e.channels.deliver({agentId:l.id,sessionKey:z,channelId:I.target.channel,recipient:I.target.to,turnId:L,text:B.text})}).catch(()=>{}).finally(()=>{f.delete(L)});if(p.stream!==!0)return E({turnId:L,sessionKey:z},202);return ve(e,L,{accepted:{turnId:L,sessionKey:z},status:202,chunks:w})}),{capability:"chat"}),v.add("GET","/v1/agents/:id/turns/:turnId/stream",(o)=>O(e,o,async(l)=>{let c=o.params.turnId??"";if(e.streams.state(c)===void 0){let d=await l.store.turns.get(c);if(d===void 0)return R("turn",c,"No turn with this id has ever run on this agent. A turn id is the `turnId` from POST /v1/agents/:id/messages — check the agent in the path too, since a turn belongs to one.");return wt(d)}return ve(e,c,{chunks:o.url.searchParams.get("chunks")==="true"})}),{capability:"read",streaming:!0}),v.add("POST","/v1/agents/:id/turns/:turnId/stop",(o)=>O(e,o,()=>{let l=o.params.turnId??"",c=f.get(l);if(c===void 0)return S({code:"turn_not_running",message:`No cancel handle for turn ${l} on this API.`,hint:"This surface can stop a turn it started. A turn that has already finished cannot be stopped at all — read its final state from GET /v1/agents/:id/turns/:turnId. A turn started by a channel, a schedule, or another process is running without a handle here."},409);return c.abort(),E({turnId:l,stopping:!0},202)}),{capability:"chat"}),v.add("GET","/v1/agents/:id/approvals",(o)=>O(e,o,async(l)=>E({approvals:m.pending(l.id)})),{capability:"read"}),v.add("POST","/v1/agents/:id/approvals/:approvalId",(o)=>O(e,o,async()=>{let l=await U(o.request);if(l.kind==="error")return S(l.error,400);let c=K(xe,l.value);if(!c.ok)return S(c.error,400);let d=c.value,p=o.params.approvalId??"";if(!m.resolve(p,d.granted))return S({code:"approval_not_found",message:`No approval with id ${p} is waiting.`,hint:'It was answered already, or its turn ended while it waited — a stopped or timed-out turn abandons its question, and `approval.resolved` reports that as `by: "abandoned"`. GET /v1/agents/:id/approvals lists what is actually waiting. Nothing about a settled approval is kept, so this is also the answer for an id that was never real.'},404);return E({approvalId:p,granted:d.granted})}),{capability:"chat"}),v.add("GET","/",(o)=>re("/",o),{capability:"open"}),v.add("GET","/assets/app.js",(o)=>re("/assets/app.js",o),{capability:"open"}),v.add("GET","/assets/app.css",(o)=>re("/assets/app.css",o),{capability:"open"}),v.add("POST","/v1/keys",async(o)=>{let l=t.claim!==void 0&&ft(o.request)===t.claim.token,c=await U(o.request);if(c.kind==="error")return S(c.error,400);let d=K(Ee,c.value);if(!d.ok)return S(d.error,400);let p=d.value,w=qr(p.label);if(w!==void 0)return S({code:"key_label_invalid",message:w,hint:`A label is shown in a listing and in the UI, so it is at most ${Fn} printable characters on one line. It is a display name, not a description.`,field:"label"},400);if(l&&t.claim?.spend()!==!0)return be();let b=p.scope;if(b?.agents!==void 0){let F=new Set(e.list().map((M)=>M.id));for(let M of await e.store.agentState.list())F.add(M.agentId);let L=b.agents.filter((M)=>!F.has(M));if(L.length>0)return S({code:"key_scope_agent_unknown",message:`No agent ${L.map((M)=>JSON.stringify(M)).join(", ")} on this server.`,hint:"A key scoped to an agent that does not exist authenticates and then reaches nothing, which looks exactly like a working credential until it is used. GET /v1/agents lists what this server holds, stopped agents included.",field:"scope.agents"},400)}let z=b?.expiresIn===void 0?void 0:new Date(u()+b.expiresIn*1000).toISOString(),_=b===void 0?void 0:{...b.agents===void 0?{}:{agents:b.agents},...b.sessions===void 0?{}:{sessions:b.sessions},...b.can===void 0?{}:{can:b.can}},I=Ln(),G=await e.store.operatorKeys.issue({keyId:Zr(u()),label:p.label.trim(),fingerprint:await Dn(I),createdAt:new Date(u()).toISOString(),..._===void 0||Object.keys(_).length===0?{}:{scope:_},...z===void 0?{}:{expiresAt:z}});return E({...G,secret:I},201)},{capability:"admin"}),v.add("GET","/v1/keys",async()=>{let o=await e.store.operatorKeys.list();return E({keys:o,scope:"A key with no scope authenticates every route for every agent this server holds. A scope narrows an already-authenticated caller — it names agents, a session prefix and capabilities, and it is not an identity: there are no users, teams or roles here."})},{capability:"admin"}),v.add("DELETE","/v1/keys/:keyId",async(o)=>{let l=o.params.keyId??"",c=await e.store.operatorKeys.revoke(l,new Date(u()).toISOString());if(c===void 0)return R("key",l,"The id is the `keyId` from POST /v1/keys, not the secret — GET /v1/keys lists them. An already-revoked key is a 200 carrying its original stamp, so this really does mean no such key exists.");return E(c)},{capability:"admin"}),v.add("GET","/v1/agents/:id/turns/:turnId",(o)=>O(e,o,async(l)=>{let c=await l.store.turns.get(o.params.turnId??"");if(c===void 0)return R("turn",o.params.turnId??"");return E(c)}),{capability:"read"}),v.add("GET","/v1/agents/:id/sessions",(o)=>O(e,o,async(l)=>E(ht(o.principal,await l.store.sessions.list(l.id)))),{capability:"read"}),v.add("GET","/v1/agents/:id/sessions/:key",(o)=>O(e,o,async(l)=>{let c=o.params.key??"",d=V(o,c);if(d!==void 0)return d;let p=await l.store.sessions.get(l.id,c);if(p===void 0)return R("session",c);return E(p)}),{capability:"read"}),v.add("GET","/v1/agents/:id/sessions/:key/messages",(o)=>O(e,o,async(l)=>{let c=o.url.searchParams.get("before"),d=o.url.searchParams.get("limit"),p=V(o,o.params.key??"");if(p!==void 0)return p;let w=await l.store.messages.page(l.id,o.params.key??"",{...c===null?{}:{before:Number.parseInt(c,10)},...d===null?{}:{limit:Number.parseInt(d,10)}});return E(w)}),{capability:"read"}),v.add("DELETE","/v1/agents/:id/sessions/:key",(o)=>O(e,o,async(l)=>{let c=V(o,o.params.key??"");if(c!==void 0)return c;return await l.store.sessions.clear(l.id,o.params.key??""),E({cleared:o.params.key??"",memoryFilesKept:!0})}),{capability:"write"}),v.add("POST","/v1/agents/:id/sessions/:key/phase",(o)=>O(e,o,async(l)=>{let c=await U(o.request);if(c.kind==="error")return S(c.error,400);let d=K(_e,c.value);if(!d.ok)return S(d.error,400);let p=d.value.phase;if(typeof p!=="string"&&p!==null)return S({code:"phase_invalid",message:"phase must be a string, or null to clear it.",hint:'Send { "phase": "triage" }. Phase-scoped tool visibility arrives in Phase 7; the column is written now so a session carries the value across a restart.',field:"phase"},400);let w=V(o,o.params.key??"");if(w!==void 0)return w;return await l.store.sessions.setPhase(l.id,o.params.key??"",p===null?void 0:p),E({phase:p})}),{capability:"write"}),v.add("GET","/v1/agents/:id/schedules",(o)=>O(e,o,async(l)=>{let c=o.url.searchParams.get("enabled"),d=await l.store.schedules.list(l.id,c===null?{}:{enabled:c==="true"});return E({schedules:d})}),{capability:"read"}),v.add("POST","/v1/agents/:id/schedules",(o)=>O(e,o,async(l)=>{let c=await U(o.request);if(c.kind==="error")return S(c.error,400);return me(e,l,c.value,void 0)}),{capability:"write"}),v.add("GET","/v1/agents/:id/schedules/:sid",(o)=>O(e,o,async(l)=>{let c=o.params.sid??"",d=await l.store.schedules.get(l.id,c);return d===void 0?R("schedule",c):E(d)}),{capability:"read"}),v.add("PATCH","/v1/agents/:id/schedules/:sid",(o)=>O(e,o,async(l)=>{let c=o.params.sid??"",d=await l.store.schedules.get(l.id,c);if(d===void 0)return R("schedule",c);let p=await U(o.request);if(p.kind==="error")return S(p.error,400);let w=p.value===null||typeof p.value!=="object"||Array.isArray(p.value)?{}:p.value,{id:b,...z}=w,_={kind:d.kind,expr:d.expr,task:d.task,deliver:d.deliverChannel===void 0||d.deliverTo===void 0?"none":{channel:d.deliverChannel,to:d.deliverTo},session:d.sessionMode,enabled:d.enabled,...d.timezone===void 0?{}:{timezone:d.timezone},...d.role===void 0?{}:{role:d.role},...z,id:d.id};return me(e,l,_,d)}),{capability:"write"}),v.add("DELETE","/v1/agents/:id/schedules/:sid",(o)=>O(e,o,async(l)=>{let c=o.params.sid??"";if(!await l.store.schedules.remove(l.id,c))return R("schedule",c);return e.scheduler.changed(),E({removed:c})}),{capability:"write"}),v.add("POST","/v1/agents/:id/schedules/:sid/run",(o)=>O(e,o,async(l)=>{let c=o.params.sid??"",d=await l.store.schedules.get(l.id,c);if(d===void 0)return R("schedule",c);let p=Gr(),w=eo(d.sessionMode,d.id,p),b=Kt();return e.streams.open(b),l.send(d.task,{sessionKey:w,turnId:b,source:`schedule:${d.id}:manual`,...d.role===void 0?{}:{role:d.role}}).catch(()=>{}),E({scheduleId:d.id,turnId:b,sessionKey:w,outOfBand:!0},202)}),{capability:"write"}),v.add("GET","/v1/agents/:id/tools",(o)=>O(e,o,(l)=>{let c=l.manifest.phases,d=dr(c);return E(l.tools.specs().map((p)=>({slug:p.slug,summary:p.summary,mutating:p.mutating,trust:p.trust,...p.trustReason===void 0?{}:{trustReason:p.trustReason},provider:p.provider??"local",tags:p.tags,...d?{phases:Yr(c,p)}:{}})))}),{capability:"read"}),v.add("GET","/v1/agents/:id/skills",(o)=>O(e,o,(l)=>{let c=l.skills;if(c===void 0)return E({skills:[],configured:!1});return E({configured:!0,maxActive:c.maxActive,threshold:c.threshold,cached:c.cached,skills:c.skills.map((d)=>({name:d.name,description:d.frontmatter.description,tokens:d.tokens,...d.frontmatter.whenNotToUse===void 0?{}:{whenNotToUse:d.frontmatter.whenNotToUse},scripts:d.scripts.map((p)=>p.slug)}))})}),{capability:"read"}),v.add("GET","/v1/agents/:id/context",(o)=>O(e,o,async(l)=>{let c=o.url.searchParams.get("sessionKey"),d=o.url.searchParams.get("input");return E(await l.previewContext({...c===null?{}:{sessionKey:c},...d===null?{}:{input:d}}))}),{capability:"read"}),v.add("POST","/v1/channels/:channelId/webhook/:agentId",async(o)=>{let l=await U(o.request);if(l.kind==="error")return S(l.error,400);let c={};o.request.headers.forEach((p,w)=>{c[w.toLowerCase()]=p});let d=await e.channels.handleWebhook(o.params.agentId??"",o.params.channelId??"",{body:l.value,headers:c});return new Response(d.detail??"",{status:d.status,headers:{"content-type":"text/plain; charset=utf-8"}})},{capability:"open"}),v.add("GET","/v1/events",(o)=>{let l=o.url.searchParams.get("agentId");if(l!==null&&!q(o.principal,l))return R("agent",l);let c=o.url.searchParams.get("types")?.split(",").filter(Boolean),d=o.url.searchParams.get("chunks")==="true",p=c?.includes("model.chunk")===!0,w=d||p,b=c?.filter((z)=>!Ce.includes(z));if(b!==void 0&&b.length>0){let z=bt(b[0]??"",Ce);return S({code:"unknown_event_type",message:`No such event type: ${b.join(", ")}.`,hint:z===void 0?"The full catalogue is the event table in docs/04-SPEC-WIRE.md. Omit ?types= to receive every event.":`Did you mean "${z}"? The full catalogue is the event table in docs/04-SPEC-WIRE.md.`,field:"types"},400)}return oe({...o.request.signal===void 0?{}:{signal:o.request.signal},start:({send:z})=>(z({event:"stream.subscribed",data:{agentId:l??null,types:c??null,chunks:w,...w&&!d?{implied:"types names model.chunk"}:{}}}),e.bus.on("*",(_)=>{if(l!==null&&_.agentId!==l)return;if(_.agentId!==void 0&&!q(o.principal,_.agentId))return;if(_.sessionKey!==void 0&&!X(o.principal,_.sessionKey))return;if(c!==void 0&&c.length>0&&!c.includes(_.type))return;z({event:_.type,data:_})},{chunks:w}))})},{capability:"read",streaming:!0}),Object.assign(async(o)=>{let l;try{l=new URL(o.url)}catch{return S({code:"bad_request_url",message:"The request URL could not be parsed.",hint:"This usually means the server was handed a relative URL. A handler mounted inside another framework needs an absolute request.url."},400)}let c=o.method.toUpperCase();if(c==="OPTIONS"){let b=v.match("OPTIONS",l.pathname);if(b.kind==="method"){let _=v.match("HEAD",l.pathname).kind==="method"&&dt(v,l.pathname),I=[...b.allowed,...b.allowed.includes("GET")&&!_?["HEAD"]:[],"OPTIONS"];return C(o,new Response(null,{status:204,headers:{allow:I.join(", "),...t.origin===void 0?{}:Xe(o,I)}}))}}if(c==="HEAD"){let b=v.match("GET",l.pathname);if(b.kind==="found"){if(b.streaming)return S({code:"method_not_allowed",message:`HEAD is not allowed on ${l.pathname}.`,hint:"This path answers with an open event stream. A HEAD would have to start one and then throw the body away, leaving a subscription nothing ever closes — so it is refused rather than leaked. Use GET, or GET /v1/health to check the server is up."},405,{allow:"GET, OPTIONS"});let z=A(o);if(z!==void 0)return z;let _=await T(o,l.pathname,b.capability);if(_ instanceof Response)return _;let I=await ge(b.handler,{request:o,url:l,params:b.params,principal:_});return C(o,new Response(null,{status:I.status,headers:I.headers}))}}let d=v.match(c,l.pathname);if(d.kind==="method")return S({code:"method_not_allowed",message:`${c} is not allowed on ${l.pathname}.`,hint:`This path accepts ${d.allowed.join(", ")}.`},405,{allow:d.allowed.join(", ")});if(d.kind==="none")return S({code:"not_found",message:`No route for ${o.method} ${l.pathname}.`,hint:"Every path is under /v1. See docs/04-SPEC-WIRE.md for the surface."},404);let p=A(o);if(p!==void 0)return p;let w=await T(o,l.pathname,d.capability);if(w instanceof Response)return w;return C(o,await ge(d.handler,{request:o,url:l,params:d.params,principal:w}))},{authenticate:(o)=>T(o,"/v1/ws","read")})}async function me(t,e,n,u){if(n===null||typeof n!=="object"||Array.isArray(n))return S({code:"schedule_invalid",message:"A schedule must be a JSON object.",hint:"Send { id, kind, expr, task, deliver } — see docs/02-SPEC-MANIFEST.md."},400);try{let s=to({agentId:e.id,body:n,channelIds:e.manifest.channels.map((m)=>m.id),roleNames:Object.keys(e.manifest.model),now:Date.now(),origin:"api",...u===void 0?{}:{existing:u}}),f=await e.store.schedules.upsert(s);return t.scheduler.changed(),E(f,u===void 0?201:200)}catch(s){let f=ke(s)?s.toDetail():{code:"schedule_invalid",message:s instanceof Error?s.message:String(s),hint:"See docs/02-SPEC-MANIFEST.md for the schedule fields."};return S(f,400)}}function re(t,e){let n=it(t,e.request);if(n===void 0)throw new j({code:"web_asset_missing",message:`No web asset for ${t}.`,hint:"The routes in handler.ts and the table in web.ts have diverged, which spec.test.ts asserts cannot happen — so this build is inconsistent. Rebuild with `bun run build`."});return n}function E(t,e=200){return new Response(JSON.stringify(t),{status:e,headers:{"content-type":"application/json; charset=utf-8"}})}function ct(t){return t==="/v1/health"||t==="/v1/ready"||t.startsWith("/v1/channels/")||lt.includes(t)||t==="/docs"||t==="/v1/openapi.json"}function dt(t,e){let n=t.match("GET",e);return n.kind==="found"&&n.streaming}async function ge(t,e){try{return await t(e)}catch(n){if(ke(n))return S(n.toDetail(),400);return S({code:"internal_error",message:n instanceof Error?n.message:String(n),hint:"An unexpected failure in the server. The runtime's event stream carries what happened around it."},500)}}function R(t,e,n){return S({code:`${t}_not_found`,message:`No ${t} "${e}".`,hint:n??"Check the id — it is case-sensitive, and a session key includes its channel segment."},404)}function ft(t){let e=t.headers.get("authorization")??"";if(!e.startsWith("Bearer "))return;let n=e.slice(7);return n===""?void 0:n}function O(t,e,n){let u=e.params.id??"",s=t.list().find((f)=>f.id===u);if(s===void 0)return R("agent",u);if(!q(e.principal,u))return R("agent",u);return n(s)}function pt(t,e){if(!je(t))return e;return e.filter((n)=>q(t,n.id))}function ht(t,e){if(!je(t))return e;return e.filter((n)=>X(t,n.sessionKey))}function V(t,e){return X(t.principal,e)?void 0:R("session",e)}function ye(t,e){let n=e.manifest.phases,u=dr(n);return{id:e.id,name:e.manifest.name??e.id,status:"loaded",model:e.manifest.model.main.id,channels:t.channels.statusOf(e.id),entryPhase:u?Vr(n)??null:null,...u?{phases:Object.keys(n)}:{}}}function le(t){return{...t.disabledAt===void 0?{}:{disabledAt:t.disabledAt},...t.reason===void 0?{}:{reason:t.reason}}}async function U(t){let e=Number.parseInt(t.headers.get("content-length")??"0",10);if(Number.isFinite(e)&&e>Q)return{kind:"error",error:{code:"body_too_large",message:`The request body declares ${e} bytes; the limit is ${Q}.`,hint:"This cap is enforced before a channel plugin sees anything, so a plugin never has to defend against a large POST."}};let n=await t.text();if(n.length>Q)return{kind:"error",error:{code:"body_too_large",message:`The request body is ${n.length} bytes; the limit is ${Q}.`,hint:"Send less. A message longer than this is not a message."}};if(n==="")return{kind:"ok",value:{}};try{return{kind:"ok",value:JSON.parse(n)}}catch(u){return{kind:"error",error:{code:"body_not_json",message:`The request body is not valid JSON: ${u instanceof Error?u.message:String(u)}`,hint:"Send application/json. A shell quoting mistake is the usual cause — check for unescaped quotes inside the payload."}}}}function mt(t){if(t===void 0||t===null)return{kind:"ok",from:void 0};let e=(u,s,f="from")=>({kind:"error",error:{code:"sender_invalid",message:u,hint:s,field:f}});if(typeof t!=="object")return e("from must be an object.",'Send { "from": { "id": "agent:ops-bot", "kind": "agent" } }, or omit it entirely for a turn the token-holder is sending itself.');let n=t;if(typeof n.id!=="string"||n.id.trim()==="")return e("from.id is required and must be a non-empty string.","Use a stable identity in your own namespace — `agent:ops-bot`, `user:018f…`, an email address. It is opaque to this runtime and is recorded on the turn so an audit can answer who asked.","from.id");if(n.id.length>he)return e(`from.id is ${n.id.length} characters, over the ${he} limit.`,"A sender id is an identifier, not a payload. It is rendered into the prompt's fence label, so an unbounded one spends the context window the message needs.","from.id");if(typeof n.kind!=="string"||!Pe.includes(n.kind)){let u=typeof n.kind==="string"?bt(n.kind,Pe):void 0;return e(`from.kind must be one of: ${Pe.join(", ")}.`,`${u===void 0?"":`Did you mean "${u}"? `}This field decides the trust boundary — "agent" fences the message and blocks mutating tools for the turn, "user" does not — so there is no default and an unknown value is refused rather than guessed at. A turn the token-holder is sending itself omits "from".`,"from.kind")}if(n.name!==void 0&&typeof n.name!=="string")return e("from.name must be a string when present.","It is a display name only and is rendered inside the fence, never above it. Omit it if you have none.","from.name");return{kind:"ok",from:{id:n.id,kind:n.kind,...n.name===void 0?{}:{name:n.name.slice(0,ot)}}}}function gt(t){let e=t.headers.get("idempotency-key");if(e===null)return{kind:"ok",key:void 0};let n=e.trim(),u=(s)=>({kind:"error",error:{code:"idempotency_key_invalid",message:s,hint:`Send 1-${ae} printable ASCII characters that are unique per logical request — a UUID is the usual choice. Omit the header entirely to accept that a retry runs the turn again. Printable ASCII because the key is a database key, and node:sqlite truncates a bound string at a NUL byte where bun:sqlite stores it whole.`,field:"Idempotency-Key"}});if(n==="")return u("Idempotency-Key is present but empty.");if(n.length>ae)return u(`Idempotency-Key is ${n.length} characters, over the ${ae} limit.`);if(!/^[\x20-\x7e]+$/.test(n))return u("Idempotency-Key contains characters that are not printable ASCII.");return{kind:"ok",key:n}}async function yt(t,e){let n=new TextEncoder().encode(`${t}\x00${e}`),u=await crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(u)).map((s)=>s.toString(16).padStart(2,"0")).join("")}function vt(t){if(t===void 0||t===null||t==="none")return{kind:"ok",target:void 0};if(typeof t==="object"){let e=t;if(typeof e.channel==="string"&&typeof e.to==="string")return{kind:"ok",target:{channel:e.channel,to:e.to}}}return{kind:"error",error:{code:"deliver_invalid",message:'deliver must be "none" or { channel, to }.',hint:'A bare channel id is not enough on an API turn: the request has no originating conversation, so there is no recipient to infer. Send { "channel": "tg", "to": "12345" }, or "none" to read the reply from the event stream.',field:"deliver"}}}function wt(t){let e=t.status==="running";return oe({start:({send:n,close:u})=>{n({event:e?"stream.unavailable":"stream.ended",data:{turnId:t.turnId,status:t.status,sessionKey:t.sessionKey,...e?{reason:"no buffer for this turn in this process",hint:"The turn is recorded as running but is not observable here — its events are buffered in whichever process is executing it, and buffers are in-memory and per-process. Poll GET /v1/agents/:id/turns/:turnId for the outcome."}:{steps:t.steps,...t.errorCode===void 0?{}:{errorCode:t.errorCode},hint:"This turn finished before you attached and its buffer has been evicted. Its full text is in GET /v1/agents/:id/turns/:turnId."}}}),u();return}})}function ve(t,e,n){return oe({...n?.status===void 0?{}:{status:n.status},start:({send:u,close:s})=>{if(n?.accepted!==void 0)u({event:"turn.accepted",data:n.accepted});let f=t.streams.attach(e,(m)=>{if(u({event:m.type,data:m}),m.type==="turn.end")s()},{chunks:n?.chunks===!0});if(f===void 0){u({event:"stream.unavailable",data:{turnId:e,reason:"no buffer for this turn in this process",hint:"Read the final state from GET /v1/agents/:id/turns/:turnId. Buffers are in-memory and are evicted after a turn ends."}}),s();return}u({event:"stream.replay",data:{turnId:e,state:f.state,events:f.replay.length,truncated:f.truncated,dropped:f.dropped,chunks:f.chunks,...f.truncated?{hint:`The oldest ${f.dropped} event(s) of this turn were discarded to stay under the buffer cap, so this replay starts mid-turn. The turn's final text is complete in GET /v1/agents/:id/turns/:turnId.`}:{}}});for(let m of f.replay)u({event:m.type,data:m});if(f.state==="ended")s();return()=>f.unsubscribe()}})}function Or(){let t=Ln(),e=!1;return{token:t,live:()=>!e,spend:()=>{if(e)return!1;return e=!0,!0}}}function An(t){let e=t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t,n=e==="0.0.0.0"||e==="::"||e===""?"127.0.0.1":e;return n.includes(":")?`[${n}]`:n}function Nr(t,e,n){return`http://${An(t)}:${e}/?claim=${n}`}function Cr(t,e,n){return`curl -sX POST http://${An(t)}:${e}/v1/keys -H 'Authorization: Bearer ${n}' -H 'content-type: application/json' -d '{"label":"my browser"}'`}function kt(t,e,n=new Map){let u=new Set,s,f=0,m,x=(y)=>{let P=y.type==="model.chunk";for(let T of u){if(T.data.agentId!==void 0&&y.agentId!==T.data.agentId)continue;if(y.agentId!==void 0&&!q(T.data.principal,y.agentId))continue;if(y.sessionKey!==void 0&&!X(T.data.principal,y.sessionKey))continue;if(P&&!T.data.chunks)continue;try{T.send(JSON.stringify(y))}catch{}}},A=()=>{if(f+=1,m===void 0)m=t.bus.on("model.chunk",x)},C=()=>{if(f===0)return;if(f-=1,f===0)m?.(),m=void 0};return{async accept(y){let P=new URL(y.url),T=Me(y),v=P.searchParams.get("token"),o=await e(Ue(y,T??v??""));if(o instanceof Response)return{kind:"reject",response:o};let l=P.searchParams.get("agentId");if(l!==null&&!q(o,l))return{kind:"reject",response:new Response(JSON.stringify({error:{code:"agent_not_found",message:`No agent "${l}".`,hint:"Check the id — it is case-sensitive. A key scoped away from an agent sees exactly what a caller asking for one that does not exist sees."}}),{status:404,headers:{"content-type":"application/json"}})};return{kind:"accept",session:{agentId:l??void 0,chunks:P.searchParams.get("chunks")==="true",principal:o},...T===void 0?{}:{protocol:we}}},handlers:{open(y){if(u.add(y),s===void 0)s=t.bus.on("*",x);if(y.data.chunks)A();y.send(JSON.stringify({type:"ws.open",agentId:y.data.agentId??null,chunks:y.data.chunks}))},message(y,P){let T;try{T=JSON.parse(typeof P==="string"?P:new TextDecoder().decode(P))}catch{y.send(JSON.stringify({type:"ws.error",code:"frame_not_json"}));return}if(T.type==="ping"){y.send(JSON.stringify({type:"pong"}));return}if(T.type==="subscribe"){if(T.agentId===void 0&&T.sessionKey!==void 0){y.send(JSON.stringify({type:"ws.error",code:"subscribe_needs_agent_id",hint:"Send { type: 'subscribe', agentId: '<agent>' }. A socket filters on the agent an event carries; sessionKey names a conversation and can never match one, so a socket pointed with it receives nothing."}));return}let d=typeof T.chunks==="boolean"?T.chunks:y.data.chunks;if(d&&!y.data.chunks)A();else if(!d&&y.data.chunks)C();let p=T.agentId??y.data.agentId;if(p!==void 0&&!q(y.data.principal,p)){y.send(JSON.stringify({type:"ws.error",error:{code:"agent_not_found",message:`No agent "${p}".`,hint:"Check the id — it is case-sensitive. A key scoped away from an agent sees exactly what a caller asking for one that does not exist sees."}}));return}y.data={agentId:p,chunks:d,principal:y.data.principal},y.send(JSON.stringify({type:"ws.subscribed",agentId:y.data.agentId??null,chunks:y.data.chunks}));return}if(T.type==="stop"){let d=T.turnId===void 0?void 0:n.get(T.turnId);d?.abort(),y.send(JSON.stringify({type:"ws.stopping",turnId:T.turnId??null,found:d!==void 0}));return}if(T.type!=="message"){y.send(JSON.stringify({type:"ws.error",code:"unknown_frame_type"}));return}let v=y.data.agentId,H=t.list().find((d)=>d.id===v);if(H===void 0){y.send(JSON.stringify({type:"ws.error",code:"agent_not_found"}));return}let o=T.text??"";if(o.trim()===""){y.send(JSON.stringify({type:"ws.error",code:"message_text_required"}));return}let l=Kt(),c=new AbortController;n.set(l,c),y.send(JSON.stringify({type:"ws.accepted",turnId:l})),H.send(o,{sessionKey:T.sessionKey??"api:default",turnId:l,source:"ws",signal:c.signal}).catch(()=>{}).finally(()=>n.delete(l))},close(y){if(u.delete(y)&&y.data.chunks)C();if(u.size===0)s?.(),s=void 0}},closeAll(){for(let y of u)try{y.close(1001,"server stopping")}catch{}u.clear(),s?.(),s=void 0,m?.(),m=void 0,f=0}}}async function Pr(t){let{host:e,port:n,runtime:u}=t;if(!Y(e)&&t.token===void 0)throw new j({code:"server_public_without_token",message:`Refusing to bind ${e}:${n} with no API token.`,hint:"Set the variable named by server.tokenEnv, or bind 127.0.0.1. A public bind with no token exposes every endpoint — including the ones that start a turn — to anyone who can reach the port, and behaves identically to a safe one until someone finds it.",field:"server.host"});let s=new Map,f=ut({runtime:u,...t.token===void 0?{}:{token:t.token},...t.token===void 0?{allowUnauthenticated:!0}:{},...t.now===void 0?{}:{now:t.now},running:s,...t.approvals===void 0?{}:{approvals:t.approvals},...t.claim===void 0?{}:{claim:t.claim},...t.resolveAgent===void 0?{}:{resolveAgent:t.resolveAgent},...t.provision===void 0?{}:{provision:t.provision},origin:{host:t.host,...t.allowedOrigins===void 0?{}:{allowedOrigins:t.allowedOrigins},...t.allowedHosts===void 0?{}:{allowedHosts:t.allowedHosts}}});if(typeof Bun<"u"&&typeof Bun.serve==="function")return St(f,t,s);return xt(f,t)}function St(t,e,n){let u=kt(e.runtime,t.authenticate,n),s=Bun.serve({port:e.port,hostname:e.host,idleTimeout:Math.min(255,Math.ceil(Ae/1000*3)),fetch:async(f,m)=>{if(new URL(f.url).pathname!=="/v1/ws")return t(f);let A=ie(f,{host:e.host,...e.allowedOrigins===void 0?{}:{allowedOrigins:e.allowedOrigins},...e.allowedHosts===void 0?{}:{allowedHosts:e.allowedHosts}});if(A!==void 0)return new Response(JSON.stringify({error:A}),{status:403,headers:{"content-type":"application/json; charset=utf-8"}});let C=await u.accept(f);if(C.kind==="reject")return C.response;if(m.upgrade(f,{data:C.session,...C.protocol===void 0?{}:{headers:{"sec-websocket-protocol":C.protocol}}}))return;return new Response("upgrade failed",{status:400})},websocket:{open:(f)=>u.handlers.open(f),message:(f,m)=>u.handlers.message(f,m),close:(f)=>u.handlers.close(f)}});return{url:`http://${e.host}:${s.port}`,port:s.port??e.port,host:e.host,websocket:!0,stop:async()=>{u.closeAll(),await s.stop(!0)}}}async function xt(t,e){let{createServer:n}=await import("node:http"),u=n((m,x)=>{(async()=>{let A=[];for await(let o of m)A.push(o);let C=`http://${m.headers.host??`${e.host}:${e.port}`}${m.url??"/"}`,y=new Headers;for(let[o,l]of Object.entries(m.headers))if(typeof l==="string")y.set(o,l);else if(Array.isArray(l))y.set(o,l.join(", "));if(new URL(C).pathname==="/v1/ws"){x.writeHead(501,{"content-type":"application/json; charset=utf-8"}),x.end(JSON.stringify({error:{code:"websocket_unavailable",message:"This process is running under Node, where /v1/ws is not served.",hint:"Run under Bun for WebSocket support, or use GET /v1/events (SSE) plus POST /v1/agents/:id/messages — everything the WS endpoint does is achievable over HTTP, which is why the spec calls it secondary."}}));return}let P=m.method??"GET",T=await t(new Request(C,{method:P,headers:y,...P==="GET"||P==="HEAD"?{}:{body:Buffer.concat(A)}})),v={};if(T.headers.forEach((o,l)=>{v[l]=o}),x.writeHead(T.status,v),T.body===null){x.end();return}let H=T.body.getReader();x.on("close",()=>void H.cancel().catch(()=>{}));for(;;){let{done:o,value:l}=await H.read();if(o)break;x.write(Buffer.from(l))}x.end()})().catch(()=>{if(!x.headersSent)x.writeHead(500);x.end()})});await new Promise((m,x)=>{u.once("error",x),u.listen(e.port,e.host,()=>{u.removeListener("error",x),m()})});let s=u.address(),f=typeof s==="object"&&s!==null?s.port:e.port;return{url:`http://${e.host}:${f}`,port:f,host:e.host,websocket:!1,stop:()=>new Promise((m)=>{u.closeAllConnections?.(),u.close(()=>m())})}}
74
- export{sr,Or,An,Nr,Cr,Pr};
75
-
76
- //# debugId=FC1B72DA08B1A24D64756E2164756E21
77
- //# sourceMappingURL=index-9pj1ws0p.js.map